mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
add socket
This commit is contained in:
parent
ad5c721056
commit
3c51eaad96
@ -78,6 +78,10 @@ type TCPSocket struct {
|
|||||||
cn context.CancelFunc
|
cn context.CancelFunc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (t *TCPSocket) Socket() js.Value {
|
||||||
|
return t.socket
|
||||||
|
}
|
||||||
|
|
||||||
// Read reads data from the connection.
|
// Read reads data from the connection.
|
||||||
// Read can be made to time out and return an error after a fixed
|
// Read can be made to time out and return an error after a fixed
|
||||||
// time limit; see SetDeadline and SetReadDeadline.
|
// time limit; see SetDeadline and SetReadDeadline.
|
||||||
@ -122,7 +126,7 @@ func (t *TCPSocket) Write(b []byte) (n int, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// StartTls will call startTls on the socket
|
// StartTls will call startTls on the socket
|
||||||
func (t *TCPSocket) Close() error {
|
func (t *TCPSocket) StartTls() error {
|
||||||
t.socket.Call("startTls")
|
t.socket.Call("startTls")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user