mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-07 05:18:40 -04:00
updated to zola 0.22, added theme to code blocks
This commit is contained in:
parent
5d0552c531
commit
9356e79e1a
11 changed files with 143 additions and 11 deletions
|
|
@ -6,4 +6,20 @@ date = 2025-05-07
|
|||
[taxonomies]
|
||||
tags = ["java", "bytecode"]
|
||||
+++
|
||||
|
||||
|
||||
```java
|
||||
public static Future<Void, IOException> echo(@Cancellation("close") Socket socket) throws IOException {
|
||||
try(socket){
|
||||
var buffer = ByteBuffer.allocate(4096*2);
|
||||
while(true){
|
||||
bytes_received = socket.read(buffer).await() + bytes_received;
|
||||
buffer.flip();
|
||||
bytes_sent = socket.write_all(buffer).await() + bytes_sent;
|
||||
buffer.clear().limit(buffer.capacity());
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
https://github.com/ParkerTenBroeck/generators
|
||||
Loading…
Add table
Add a link
Reference in a new issue