Anonymous
public text v1 · immutablerequire("gm_tcp")
require("tcp")
sock1 = tcp.New()
sock2 = tcp.New()
local _,err = tcp.Bind( sock1, 1234 )
--print("Bind",err)
local _,err = tcp.Listen( sock1, 0 )
--print("Listen",err)
tcp.Connect( sock2, "127.0.0.1", "1234" )
tcp.Accept(sock1)
function blah()
tcp.Send(sock2,"Hello")
print(tcp.Read(sock1,20))
end
hook.Add("Think","kahdjsad",blah)