Back and running

This commit is contained in:
Henry Camacho 2017-03-24 17:45:54 -05:00
parent 12c8275326
commit 1701b1acb0
3 changed files with 8 additions and 11 deletions

View File

@ -2,7 +2,6 @@ package genericlistener
import (
"context"
"encoding/hex"
"io"
"strconv"
"sync"
@ -224,11 +223,11 @@ func (c *Connection) Reader(ctx context.Context) {
loginfo.Println("Reader Start ", c)
c.conn.SetReadLimit(65535)
//c.conn.SetReadLimit(65535)
for {
msgType, message, err := c.conn.ReadMessage()
_, message, err := c.conn.ReadMessage()
loginfo.Println("ReadMessage", msgType, err)
//loginfo.Println("ReadMessage", msgType, err)
c.Update()
@ -245,10 +244,10 @@ func (c *Connection) Reader(ctx context.Context) {
key := p.Header.Address().String() + ":" + strconv.Itoa(p.Header.Port)
track, err := connectionTrack.Lookup(key)
loginfo.Println(hex.Dump(p.Data.Data()))
//loginfo.Println(hex.Dump(p.Data.Data()))
if err != nil {
loginfo.Println("Unable to locate Tracking for ", key)
//loginfo.Println("Unable to locate Tracking for ", key)
continue
}
@ -263,7 +262,7 @@ func (c *Connection) Reader(ctx context.Context) {
c.addIn(int64(len(message)))
c.addResponse()
loginfo.Println("end of read")
//loginfo.Println("end of read")
}
}

View File

@ -370,8 +370,8 @@ func handleWssClient(ctx context.Context, oneConn *oneConnListener) {
domains, ok := claims["domains"].([]interface{})
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
ReadBufferSize: 65535,
WriteBufferSize: 65535,
}
conn, err := upgrader.Upgrade(w, r, nil)

View File

@ -45,8 +45,6 @@ func splitHeader(header []byte, names []string) (map[string]string, error) {
//ReadMessage -
func ReadMessage(b []byte) (*Packer, error) {
fmt.Println("ReadMessage")
// Detect protocol in use
if b[0] == packerV1 {
// Separate the header and body using the header length in the second byte.