Handshake does the initial handshaking according to the connection role.
()
| 72 | |
| 73 | // Handshake does the initial handshaking according to the connection role. |
| 74 | func (c *NAConn) Handshake() (err error) { |
| 75 | if c.isClient { |
| 76 | return c.clientHandshake() |
| 77 | } |
| 78 | return c.serverHandshake() |
| 79 | } |
| 80 | |
| 81 | func (c *NAConn) serverHandshake() (err error) { |
| 82 | headerBuf := make([]byte, HeaderSize) |
no test coverage detected