Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Lupino/hole
/ functions
Functions
44 in github.com/Lupino/hole
⨍
Functions
44
◇
Types & classes
7
↓ 6 callers
Method
FeedEOF
FeedEOF feed eof when the stream is closed.
stream.go:48
↓ 5 callers
Method
Close
()
utils_test.go:52
↓ 5 callers
Method
FeedData
FeedData feed buffer from a socket or other.
stream.go:35
↓ 5 callers
Function
PipeThenClose
PipeThenClose copies data from src to dst, closes dst when done.
utils.go:63
↓ 5 callers
Method
Read
(buf []byte)
stream.go:58
↓ 5 callers
Method
Write
(buf []byte)
utils_test.go:45
↓ 3 callers
Function
DecodePacket
DecodePacket decode the data and sessionID from a packet.
utils.go:53
↓ 3 callers
Function
NewReadStream
NewReadStream create a read strean
stream.go:26
↓ 3 callers
Method
Receive
Receive waits for a new message on conn, and receives its payload.
conn.go:46
↓ 3 callers
Method
receive
(length uint32)
conn.go:73
↓ 3 callers
Method
write
(data []byte)
conn.go:110
↓ 2 callers
Method
ConfigTLS
ConfigTLS config tls for server
server.go:93
↓ 2 callers
Function
EncodePacket
EncodePacket encode the data with sessionID.
utils.go:44
↓ 2 callers
Function
MakeHeader
Framing: In order to handle framing in Send/Recieve, as these give frame boundaries we use a very simple 4 bytes header. MakeHeader make a very simple
utils.go:18
↓ 2 callers
Function
NewConn
NewConn create a connection
conn.go:29
↓ 2 callers
Function
NewSession
NewSession create a new session with sessionID and conn.
session.go:11
↓ 2 callers
Function
ParseHeader
ParseHeader parse a very simple 4 bytes header and extract the data length.
utils.go:36
↓ 2 callers
Method
Send
Send a new message.
conn.go:87
↓ 1 callers
Method
AssignClient
AssignClient assign a client connection.
server.go:71
↓ 1 callers
Method
Connect
Connect connent to hole server.
client.go:53
↓ 1 callers
Function
NewClientConn
NewClientConn create a client connection
conn.go:41
↓ 1 callers
Function
NewServerConn
NewServerConn create a server connection
conn.go:36
↓ 1 callers
Method
NewSession
NewSession create a session.
client.go:119
↓ 1 callers
Method
Process
Process the client.
client.go:86
↓ 1 callers
Method
Serve
Serve on an address. The network net must be a stream-oriented network: "tcp", "tcp4", "tcp6", "unix" or "unixpacket".
server.go:44
↓ 1 callers
Method
Write
(data []byte)
stream.go:94
↓ 1 callers
Method
clientIsAlive
()
server.go:85
↓ 1 callers
Method
handleClient
(conn net.Conn)
server.go:130
↓ 1 callers
Method
handleConnection
(conn net.Conn)
server.go:116
↓ 1 callers
Method
handleSession
(session Session)
client.go:128
Method
Close
Close the write stream.
stream.go:101
Method
ConfigTLS
ConfigTLS config the client.
client.go:38
Function
NewClient
NewClient create a new client.
client.go:28
Function
NewServer
NewServer create a new server.
server.go:31
Function
TestEncodeAndDecodePacket
(t *testing.T)
utils_test.go:23
Function
TestHeader
(t *testing.T)
utils_test.go:9
Function
TestPipeThenClose
(t *testing.T)
utils_test.go:56
Function
TestReadStream
(t *testing.T)
stream_test.go:9
Function
init
()
cmd/holed/main.go:13
Function
init
()
cmd/hole/main.go:18
Function
init
()
cmd/hole-keys/main.go:17
Function
main
()
cmd/holed/main.go:21
Function
main
()
cmd/hole/main.go:27
Function
main
()
cmd/hole-keys/main.go:22