so i started working with the network disk that comes as dungeon loot for OC and i think i've run into something. i can set IP's for my server, listen on ports, open connections between computers and send messages, but when i try to close the connection, it doesn't fire an event to close the connection.
server A
network.ip.bind("192.168.1.1")
network.tcp.listen(1024)
while true do local _, event, ch, data, remoteaddr, port = event.pull("tcp") print(event, ch, data, remoteaddr, port) end
server B
network.ip.bind("192.168.1.10")
network.tcp.open("192.168.1.1", 1024) -- Server A response with a connection event when this is sent
network.tcp.send(1, "test") -- Server A responds with message event
network.tcp.close(1) -- errors with address must be a string!!
network.tcp.close("192.168.1.1") -- does nothing that i can see, and doesn't fire event on server A but doesn't error out either.
network.tcp.close("192.168.1.1", 1) -- does nothing as well
also as well i seem to not understand the principle behind the channels. if some sort of brief explaination of the channels could be given, that would be great. and maybe some help on why i can't close connections. any help we be greatly appreciated. thanks!
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
so i started working with the network disk that comes as dungeon loot for OC and i think i've run into something. i can set IP's for my server, listen on ports, open connections between computers and send messages, but when i try to close the connection, it doesn't fire an event to close the connection.
server A
server B
also as well i seem to not understand the principle behind the channels. if some sort of brief explaination of the channels could be given, that would be great. and maybe some help on why i can't close connections. any help we be greatly appreciated. thanks!
Link to post
Share on other sites