Skip to content

Instantly share code, notes, and snippets.

package main
import (
"flag"
"log"
"io"
"net"
"golang.org/x/net/proxy"
)
@rhs
rhs / deployment.yaml
Created March 6, 2018 21:44
forge project skeleton
---
apiVersion: v1
kind: Service
metadata:
name: {{build.name}}
spec:
type: ClusterIP
selector:
app: {{build.name}}
ports:
private int offset = 0;
@Override
protected void onTransport(final Transport transport)
{
ByteBuf bytes = getPooledNettyBytes(transport);
// null means nothing to be written
if (bytes != null)
{
final int size = bytes.readableBytes();
/**
* this method will change the readerIndex on bytes to the latest read position
*/
public void pump(ByteBuf bytes)
{
if (bytes.readableBytes() < 8)
{
return;
}
public void pump(ByteBuf bytes)
{
if (bytes.readableBytes() < 8)
{
return;
}
try
{