TCP

Blitz3D Forums/Blitz3D Programming/TCP

Nike(Posted 2009) [#1]
I am making a chatroom in tcp where there is three different kinds of windows. The server window, the talking window, and the viewing window. Only certian people can download the talking window, but anyone can download the viewing window. The talkers must have a talking and viewing window in order to talk on my chat room and I run the server on my computer.
How would I forword the messages that come to the server from the talkers into the viewer?


AJ00200(Posted 2009) [#2]
Keep an IP list of connected chatters, and send a TCP message to every IP.
EG:
[code]
PeopleInRoom=<UPDATE WITH PEOPLE IN ROOM EVERY LOOP>
Dim IPs(<MAX ALLOWED PEOPLE-1)
For i=0 to PeopleInRoom-1
sendIM(IPs(i),<MESSAGES>)
Next
function sendIM(IP, text$)
<TCP CODE>
end function


Nike(Posted 2009) [#3]
Tried to use it but it wont work. Here is my code if it could help

Client


Viewer


Server