acidfear Posted April 3, 2007 Share Posted April 3, 2007 I searched around and found some great information on creating a simple server, and then making kind of a simple chat program. I forgot the name of the person who wrote it, but Thanks!!! (the one who wrote the TCP guide for beginners). I thought of adding the feature of who else is connected to the server and then list it in a list box on the side. When someone connected to the server, the ip would be sent to all the clients connected. But since the server is doing a loop to keep clients connected and to recieve the data, it sends it over and over until the server is closed. I then tried to come up with a way to maybe use the client to retrieve the information itself without it being sent from the server. I had no success :/. Can anyone help me out? here is the server code (seperate from the client); expandcollapse popupGlobal Const $Port = 14202 Global $MaxConc = 100 Global $MainSocket = TCPStartServer($Port, $MaxConc) If @Error <> 0 Then Exit MsgBox(16, "Error", "Server unable to initialize.") Global Const $MaxLength = 512 Global $ConnectedSocket[$MaxConc] Global $CurrentSocket = 0 Local $Track = 0 Global Const $MaxConnection = ($MaxConc - 1) For $Track = 0 To $MaxConnection Step 1 $ConnectedSocket[$Track] = -1 Next While 1 $ConnectedSocket[$CurrentSocket] = TCPAccept($MainSocket) If $ConnectedSocket[$CurrentSocket] <> -1 Then $CurrentSocket = SocketSearch() EndIf $Track = 0 For $Track = 0 To $MaxConnection Step 1 If $ConnectedSocket[$Track] <> - 1 Then $Data = TCPRecv($ConnectedSocket[$Track], $MaxLength) TCPSend($ConnectedSocket[$Track], $ConnectedSocket[$ConnectedSocket]) If $Data = "~bye" Then TCPCloseSocket($ConnectedSocket[$Track]) $ConnectedSocket[$Track] = -1 $CurrentSocket = SocketSearch() ElseIf $Data <> "" Then TCPSendMessageAll($MaxConnection, $Data) EndIf EndIf Next WEnd Func TCPSendMessageAll($ConnectionLimit, $Data) Local $Track = 0 For $Track = 0 To $ConnectionLimit Step 1 If $ConnectedSocket[$Track] <> - 1 Then TCPSend($ConnectedSocket[$Track], $Data) Next EndFunc Func TCPStartServer($Port, $MaxConnect = 1) Local $Socket $Socket = TCPStartup() Select Case $Socket = 0 SetError(@Error) Return -1 EndSelect $Socket = TCPListen(@IpAddress1, $Port, $MaxConnect) Select Case $Socket = -1 SetError(@Error) Return 0 EndSelect SetError(0) Return $Socket EndFunc Func SocketSearch() Local $Track = 0 For $Track = 0 To $MaxConnection Step 1 If $ConnectedSocket[$Track] = -1 Then Return $Track Else ; Socket In Use EndIf Next EndFunc oÝ÷ ٩ݶ§¶'§¶÷«Êg¬³(î²×è®×¬¶)à6b²×è®Ø^rçyË^vë®Èî²Û¬x-éyb²ÖèÅ«-êeiÇ¢X¬¶Ø^rçyË^u«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì(()Õ¥ ÉÑ ÅÕ½Ðí ¡ÑÑɽàÅÕ½Ðì°ÌàÀ°Ääà°´Ä°´Ä° ¥Ñ=H ÀÌØí]M}=YI1AA]%9=°ÀÌØí]M} 1%AM% 1%9L¤¤((ÀÌØí%¹ÁÕÑ|ÄôÕ¥ Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÔÀ°ÈÄÀ°ÈÀ¤(ÀÌØí¥Ñ|ÈôU% Ñɱ ÉÑ1¥ÍÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°ÈÔÀ°ÄÐÀ± ¥Ñ9 ÀÌØí1 M}M=IP°ÀÌØí]M}YM I=10°ÀÌØí1 M}9=M0¤¤(ÀÌØí ÕÑѽ¹|ÌôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíM¹ÅÕ½Ðì°ÈÈÀ°ÄÔÀ°ÐÀ°ÈÀ¤(ÀÌØí ÕÑѽ¹|ÐôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ±ÈÅÕ½Ðì°ÈÈÀ°ÄÜÀ°ÐÀ°ÈÀ¤(ÀÌØí½¸ôU% Ñɱ ÉÑ1° ÅÕ½ÐìÅÕ½Ðì°ÈàÀ°ÄÀ°ÄÀÀ°ÄФ(()Õ¥MÑMÑÑ ¤()Q AMÑÉÑÕÀ ¤(ÀÌØí¥Àô%AÉÍÌÄ)±½°ÀÌØí5¥¹M½Ð)1½°ÀÌØí5á1¹Ñ ôÔÄÈ)1½°ÀÌØíA½ÉÐôÄÐÈÀÈ)1½°ÀÌØíMÉÙÈôÅÕ½ÐìÄäȸÄØà¸Ä¸ÄÀÈÅÕ½Ðì((ÀÌØí5¥¹M½ÐôQ A ½¹¹Ð ÀÌØíMÉÙÈ°ÀÌØíA½ÉФ)%ÀÌØí5¥¹M½Ðô´ÄQ¡¸(%á¥Ð(%5Í ½à ÄØ°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíU¹±Ñ¼½¹¹Ð¸ÅÕ½Ðì¤)±Í(%U% ÑɱMÑÑ ÀÌØí½¸°ÅÕ½ÐíMÑÑÕÌè ½¹¹ÑÅÕ½Ðì¤)¹%(()Q AM¹ ÀÌØí5¥¹M½Ð°ÅÕ½ÐìÅÕ½Ðì¤()]¡¥±Ä($($ÀÌØíÑôQ AIØ ÀÌØí5¥¹M½Ð°ÀÌØí5á1¹Ñ ¤(%¥ÀÌØíѱÐìÐìÅÕ½ÐìÅÕ½ÐìQ¡¸($$$%U% ÑɱMÑÑ ÀÌØí¥Ñ|È°ÀÌØí¥ÀµÀìÅÕ½ÐìÅÕ½ÐìµÀìÅÕ½ÐìèÅÕ½ÐìµÀìÅÕ½ÐìÅÕ½ÐìµÀìÀÌØíѤ($$%¹%($ÀÌØíµÍôÕ¥Ñ5Í ¤($($%¥ÀÌØíµÍôÀÌØí ÕÑѽ¹|ÌQ¡¸($$$ÀÌØí¥¹ÁÕÐôÕ¥ÑÉ±É ÀÌØí¥¹ÁÕÑ|Ĥ($$%Q AM¹ ÀÌØí5¥¹M½Ð°ÀÌØí¥¹ÁÕФ($$%U% ÑɱMÑÑ ÀÌØí¥¹ÁÕÑ|Ä°ÅÕ½ÐìÅÕ½Ðì¤($%¹%($$($$$($$($%¥ÀÌØíµÍôÀÌØí ÕÑѽ¹|ÐÑ¡¸U% ÑɱMÑÑ ÀÌØí¥Ñ|È°ÅÕ½ÐìÅÕ½Ðì¤($%¥ÀÌØíµÍôÀÌØíÕ¥}Ù¹Ñ}±½ÍÑ¡¸á¥Ð($$$($$$)]¹($$)Õ¹=¹Õѽ%Ñá¥Ð ¤(%ÀÌØí5¥¹M½Ð±ÐìÐì´ÄQ¡¸(Q AM¹ ÀÌØí5¥¹M½Ð°ÅÕ½ÐíùåÅÕ½Ðì¤(Q A ±½ÍM½Ð ÀÌØí5¥¹M½Ð¤(¹%(Q AM¡Õѽݸ ¤)¹Õ¹()á¥Ð Any help is appreciated. I apologize if this has been answered before: i haven't found one around yet. Link to comment Share on other sites More sharing options...
Alek Posted April 23, 2007 Share Posted April 23, 2007 could some1 plz reply on this, i really want to know to so far this is what i have Server: the server creates a list of the IP's connected but when ppl leave it wont remove there ip from the list. CODEexpandcollapse popup#include <GuiConstants.au3> #Include <GuiList.au3> #include <String.au3> Global $ip = @IPAddress2 Global Const $Port = 1234 Global $MaxConc = 100 Global $MainSocket = TCPStartServer($Port, $MaxConc) If @Error <> 0 Then Exit MsgBox(16, "Error", "Server unable to initialize.") Global Const $MaxLength = 512 Global $ConnectedSocket[$MaxConc] Global $CurrentSocket = 0 Local $Track = 0 Global Const $MaxConnection = ($MaxConc - 1) For $Track = 0 To $MaxConnection Step 1 $ConnectedSocket[$Track] = -1 Next $Chatgui = GuiCreate("Server - ip: " & $ip, 500, 300,-1, -1) $Chat = GUICtrlCreateEdit("", 10, 10, 370, 280,BitOR($ES_AUTOHSCROLL,$ES_READONLY,$ES_MULTILINE)) $iplist = GUICtrlCreateList("",390,10,100,280) GUICtrlSetBkColor($Chat,0xFFFFFF) GuiSetState() While 1 $ConnectedSocket[$CurrentSocket] = TCPAccept($MainSocket) If $ConnectedSocket[$CurrentSocket] <> -1 Then $CurrentSocket = SocketSearch() EndIf $Track = 0 For $Track = 0 To $MaxConnection Step 1 If $ConnectedSocket[$Track] <> - 1 Then $Data = TCPRecv($ConnectedSocket[$Track], $MaxLength) If $Data = "~bye" Then $item = _GUICtrlListFindString($iplist,SocketToIP($ConnectedSocket[$Track])) _GUICtrlListDeleteItem($iplist,$item) TCPSendMessageAll($MaxConnection, $Data) TCPCloseSocket($ConnectedSocket[$Track]) $ConnectedSocket[$Track] = -1 $CurrentSocket = SocketSearch() ElseIf $Data <> "" Then if StringRight($data,5) = "cted!" Then _GUICtrlListAddItem($iplist,SocketToIP($ConnectedSocket[$Track])) TCPSendMessageAll($MaxConnection, $Data) GUICtrlSetData($Chat,GUICtrlRead($Chat) & $data) elseif StringRight($data,5) = "Left!" Then ;REMOVE IP WHEN PPL LEAVE, whats wrong?? $item = _GUICtrlListFindString($iplist,SocketToIP($ConnectedSocket[$Track])) _GUICtrlListDeleteItem($iplist,$item) TCPSendMessageAll($MaxConnection, $Data) GUICtrlSetData($Chat,GUICtrlRead($Chat) & $data) Elseif StringLeft($data,1) = "<" then TCPSendMessageAll($MaxConnection, $Data) GUICtrlSetData($Chat,GUICtrlRead($Chat) & $data) EndIf EndIf EndIf Next WEnd Func TCPSendMessageAll($ConnectionLimit, $Data) Local $Track = 0 For $Track = 0 To $ConnectionLimit Step 1 If $ConnectedSocket[$Track] <> - 1 Then TCPSend($ConnectedSocket[$Track], $Data) Next EndFunc ;==>TCPSendMessageAll Func TCPStartServer($Port, $MaxConnect = 1) Local $Socket $Socket = TCPStartup() Select Case $Socket = 0 SetError(@Error) Return -1 EndSelect $Socket = TCPListen($ip, $Port, $MaxConnect) Select Case $Socket = -1 SetError(@Error) Return 0 EndSelect SetError(0) Return $Socket EndFunc Func SocketSearch() Local $Track = 0 For $Track = 0 To $MaxConnection Step 1 If $ConnectedSocket[$Track] = -1 Then Return $Track Else ;Socket taken EndIf Next EndFunc ;==>SocketSearch Func SocketToIP($SHOCKET) Local $sockaddr = DLLStructCreate("short;ushort;uint;char[8]") Local $aRet = DLLCall("Ws2_32.dll","int","getpeername","int",$SHOCKET, _ "ptr",DLLStructGetPtr($sockaddr),"int_ptr",DLLStructGetSize($sockaddr)) If Not @error And $aRet[0] = 0 Then $aRet = DLLCall("Ws2_32.dll","str","inet_ntoa","int",DLLStructGetData($sockaddr,3)) If Not @error Then $aRet = $aRet[0] Else $aRet = 0 EndIf $sockaddr = 0 Return $aRet EndFunc oÝ÷ Ú+l¥uéí¦¸§¶Ën}ø§¶«b~+]¢Ç§¶ËZ®Ü"¶m§ʫr¢ëÛazk ÙÚè-jwm鬫z+-ç!j×(uæèÅ«¢+Ø(¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíMÑÉ¥¹¹ÔÌÐì(¥¹±Õ±ÐíÕ¥1¥ÍйÔÌÐì(9½QÉå%½¸()±½°ÀÌØí ½¹¹ÑM½ÐôÄÈÌÔ)1½°ÀÌØí5á ½¹¹Ñ¥½¸ôÜÀÀì5᥵մµ½Õ¹Ð= ½¹ÕÉɹР½¹¹Ñ¥½¹Ì)1½°ÀÌØí5á1¹Ñ ôÔÄÈì5᥵մ1¹Ñ =MÑÉ¥¹)1½°ÀÌØíA½ÉÐôÄÈÌÐìA½ÉÐ9ÕµÈ((ÀÌØíôÀ(ÀÌØíàôÀ(ÀÌØíÐôÀ(ÀÌØí¥°ôÀ()Õ¥ ÉÑ ÅÕ½Ðí ¡ÐÅÕ½Ðì°ÄÜÀ°ÄÌÀ°´Ä°´Ä¤((ÀÌØí%¹ÁÕÑ|ÄôÕ¥ Ñɱ ÉÑ%¹ÁÕС%AÉÍÌÈ°ÄÀ°ÄÀ°ÄÔÀ°ÈÀ¤(ÀÌØí%¹ÁÕÑ|ÈôÕ¥ Ñɱ ÉÑ%¹ÁÕÐ ÄÈÌаÄÀ°ÐÀ°ÄÔÀ°ÈÀ¤(ÀÌØí%¹ÁÕÑ|ÌôÕ¥ Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½Ðí9µÅÕ½Ðì°ÄÀ°ÜÀ°ÄÔÀ°ÈÀ¤(ÀÌØí ÕÑѽ¹|ÌôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½Ðí ½¹¹ÐÅÕ½Ðì°ÄÀ°ÄÀÀ°ÄÔÀ°ÈÀ¤)U% ÑɱMÑ1¥µ¥Ð ÀÌØí%¹ÁÕÑ|Ì°ÄÀ¤()Õ¥MÑMÑÑ ¤()¼($ÀÌØí¹µÍôU%Ñ5Í ¤(%¥ÀÌØí¹µÍôÀÌØí ÕÑѽ¹|̹U% ÑɱI ÀÌØí%¹ÁÕÑ|̤±ÐìÐìÅÕ½ÐìÅÕ½Ðì¹U% ÑɱI ÀÌØí%¹ÁÕÑ|̤±ÐìÐìÅÕ½Ðí9µÅÕ½Ðì¹U% ÑɱI ÀÌØí%¹ÁÕÑ|Ȥ±ÐìÐìÅÕ½ÐìÅÕ½Ðì¹U% ÑɱI ÀÌØí%¹ÁÕÑ|Ȥ±ÐìÐìÅÕ½ÐíA½ÉÐÅÕ½Ðì¹U% ÑɱI ÀÌØí%¹ÁÕÑ|̤±ÐìÐìÅÕ½Ðí9µÅÕ½Ðì¹U% ÑɱI ÀÌØí%¹ÁÕÑ|Ĥ±ÐìÐìÅÕ½ÐìÅÕ½Ðì¹U% ÑɱI ÀÌØí%¹ÁÕÑ|Ĥ±ÐìÐìÅÕ½Ðí%@½È!½ÍѹµÅÕ½ÐíÑ¡¸($$ÀÌØíÁ¥¹ôÁ¥¹¡Õ¥ÑÉ±É ÀÌØí%¹ÁÕÑ|Ĥ¤($%¥ÀÌØíÁ¥¹ÐìÀÑ¡¸($$%¼($$$%Q AMÑÉÑÕÀ ¤($$$$ÀÌØíMÉÙÈôU% ÑɱI ÀÌØí%¹ÁÕÑ|Ĥ($$$$ÀÌØíA½ÉÐôU% ÑɱI ÀÌØí%¹ÁÕÑ|Ȥ($$$$ÀÌØí5¥¹M½ÐôQ A ½¹¹Ð ÀÌØíMÉÙÈ°ÀÌØíA½ÉФ($$$$ÀÌØí¥°ôÀÌØí¥°¬Ä($$%չѥ°ÀÌØí5¥¹M½Ð±ÐìÐì´Ä½ÈÀÌØí¥°ôÄÀ($$%%ÀÌØí5¥¹M½Ðô´ÄQ¡¸($$$%5Í ½à ÄØ°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíÉɽÈèU¹±Ñ¼½¹¹Ð¸ÅÕ½ÐìµÀì I1µÀìÅÕ½ÐíA½Í¥±Iͽ¸èÅÕ½ÐìµÀì I1µÀìÅÕ½Ðí]ɽ¹Á½ÉÐÅÕ½ÐìµÀì I1µÀìÅÕ½ÐíMÉÙÈ¥ÌÕ±°ÅÕ½ÐìµÀì I1µÀìÅÕ½ÐíMÉ٥̽ݸÅÕ½Ðì¤($$$%U% ÑɱMÑÑ ÀÌØí ÕÑѽ¹|Ì°ÅÕ½ÐíÉɽÈèQÉ䥸ÅÕ½Ðì¤($$%±Í($$$$ÀÌØí9µôU% ÑɱI ÀÌØí%¹ÁÕÑ|̤($$$$ÀÌØíôÄ($$%¹%($%±Í($$%5Í ½à ÄØ°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½ÐíU¹±Ñ¼½¹¹Ð¸ÅÕ½ÐìµÀì I1µÀìÅÕ½ÐíA½Í¥±Iͽ¸èÅÕ½ÐìµÀì I1µÀìÅÕ½Ðí]ɽ¹%@½È!½ÍѹµÅÕ½ÐìµÀì I1µÀìÅÕ½ÐíMÉÙȥ̽ݸÅÕ½Ðì¤($$%U% ÑɱMÑÑ ÀÌØí ÕÑѽ¹|Ì°ÅÕ½ÐíÉɽÈèQÉ䥸ÅÕ½Ðì¤($%¹%(%±Í¥ÀÌØí¹µÍôÀÌØí ÕÑѽ¹|ÌÑ¡¸($%5Í ½à ÄØ°ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðíå½ÔѼÍÐÑ¡½ÉÉÐ¥¹½ÉµÑ¥½¸ÅÕ½Ðì°ÄÀ¤(%¹%(%¥ÀÌØí¹µÍôÀÌØíU%}Y9Q} 1=MÑ¡¸($$ÀÌØíôÈ($%á¥Ð(%¹%($)U¹Ñ¥°ÀÌØíôÄ)U%±Ñ ¤()Q AM¹ ÀÌØí5¥¹M½Ð°ÅÕ½Ðì±ÐìÅÕ½ÐìµÀìÀÌØí¹µµÀìÅÕ½ÐìÐìè ½¹¹ÑÌÌìÅÕ½ÐìµÀì I1¤)Q AM¹ ÀÌØí5¥¹M½Ð°ÅÕ½Ðíù¹µ±ÐìÅÕ½ÐìµÀìÀÌØí¹µµÀìÅÕ½ÐìÐìÅÕ½ÐìµÀì I1¤)!½Ñ-åMÐ ÅÕ½Ðíí¹ÑÉôÅÕ½Ðì°ÅÕ½ÐíM¹µÍÅÕ½Ðì¤)ͱÀ ÔÀÀ¤((ÀÌØí¡ÑÕ¤ôÕ¥ ÉÑ ÅÕ½Ðí ¡Ð´ÅÕ½ÐìµÀìÅÕ½Ðì±ÐìÅÕ½ÐìµÀìÀÌØí¹µµÀìÅÕ½ÐìÐìÅÕ½Ðì°ÔÀÀ°ÌÐÀ°´Ä°´Ä¤((ÀÌØí¡ÑµÍôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÈÜÀ°ÌÌÀ°ØÀ°ÀÌØíM}5U1Q%1%9¤(ÀÌØíM¹ôÕ¥ Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíM¹ÅÕ½Ðì°ÌÐÀ°ÈÜÀ°ÔÀ°ØÀ¤(ÀÌØí ¡ÐôU% Ñɱ ÉÑ%¹ÁÕÐ ÅÕ½ÐìÅÕ½Ðì°ÄÀ°ÄÀ°ÌàÀ°ÈÔÀ°ÀÌØíM}5U1Q%1%9¤(ÀÌØí9µÄôU% Ñɱ ÉÑ%¹ÁÕÐ ÀÌØí9µ°ÐÀÀ°ÄÀ°äÀ°ÈÀ°ÀÌØíM}I=91d¤(ÀÌØíÁÁ±½¹±¥¹ôU% Ñɱ ÉÑ1¥ÍÐ ÅÕ½ÐìÅÕ½Ðì°ÐÀÀ°ÐÀ°äÀ°ÈäÀ¤()U% ÑɱMÑ ½±½È ÀÌØí ¡Ð°Áá¤)U% ÑɱMÑ ½±½È ÀÌØí¡ÑµÍ°Áá¤)U% ÑɱMÑ ½±½È ÀÌØí9µÄ°Áá¤)U% ÑɱMÑ1¥µ¥Ð ÀÌØí¡ÑµÍ°ÈÔÔ¤()Õ¥MÑMÑÑ ¤()¼($ÀÌØíµÍôU%Ñ5Í ¤$(%±¥ÍѸ ¤(%¥ÀÌØíµÍôÀÌØíM¹¹U% ÑɱI ÀÌØí¡ÑµÍ¤±ÐìÐìÅÕ½ÐìÅÕ½ÐìQ¡¸Í¹µÍ ¤(%¥ÀÌØíµÍôÀÌØíU%}Y9Q} 1=MQ¡¸($%Q AM¹ ÀÌØí5¥¹M½Ð°ÅÕ½Ðì±ÐìÅÕ½ÐìµÀìÀÌØí¹µµÀìÅÕ½ÐìÐìè1ÐÌÌìÅÕ½ÐìµÀì I1¤($%Q AM¡Õѽݸ ¤($$ÀÌØíàôÄ(%¹%)չѥ°ÀÌØíàôÄ()չ͹µÍ ¤(%¥]¥¹Ñ¥Ù ÀÌØí¡ÑÕ¤¤¹U% ÑɱI ÀÌØí¡ÑµÍ¤±ÐìÐìÅÕ½ÐìÅÕ½ÐìÑ¡¸($%Q AM¹ ÀÌØí5¥¹M½Ð°ÅÕ½Ðì±ÐìÅÕ½ÐìµÀìU% ÑɱI ÀÌØí9µÄ¤µÀìÅÕ½ÐìÐìèÅÕ½ÐìµÀìU% ÑɱI ÀÌØí¡ÑµÍ¤µÀì I1¤($%U% ÑɱMÑÑ ÀÌØí¡ÑµÍ°ÅÕ½ÐìÅÕ½Ðì¤(%¹%)¹Õ¹()Õ¹±¥ÍѸ ¤($ÀÌØíÑôQ AIØ ÀÌØí5¥¹M½Ð°ÀÌØí5á1¹Ñ ¤(%%ÀÌØíѱÐìÐìÅÕ½ÐìÅÕ½ÐìQ¡¸($%¥MÑÉ¥¹1Ð ÀÌØíѰĤôôÅÕ½Ðì±ÐìÅÕ½ÐìÑ¡¸($$%U% ÑɱMÑÑ ÀÌØí ¡Ð±U% ÑɱI ÀÌØí ¡Ð¤µÀìÀÌØíѵÀì I1¤($%±Í¥ÀÌØíÑôÅÕ½ÐíùåÅÕ½ÐìÑ¡¸($$%U% ÑɱMÑÑ ÀÌØí ¡Ð°ÅÕ½ÐíMÉÙȥ̽ݸÅÕ½ÐìµÀì I1¤($%±Í¥MÑÉ¥¹1Ð ÀÌØíÑ°Ô¤ôôÅÕ½Ðíù¹µÅÕ½ÐìÑ¡¸($$%U% ÑɱMÑÑ ÀÌØíÁÁ±½¹±¥¹±}MÑÉ¥¹ Ñݸ ÀÌØíÑ°ÅÕ½Ðì±ÐìÅÕ½Ðì°ÅÕ½ÐìÐìÅÕ½Ð줤($%¹%(%¹%)¹Õ¹ also i want to thank the guy who wrote the server script [font="Impact"]Never fear, I is here.[/font] Link to comment Share on other sites More sharing options...
evilertoaster Posted April 23, 2007 Share Posted April 23, 2007 Well i guess from a logical stand point you'd probably want to add some code in the send/rec loops on the cleint/server. You'd send code to the server on your logout funciton from the client. When the server realises this it would send some data to all the clints informing them of this. And in turn the cleints receive loop would have to have code to accept the incomming data. Just saying this as a general guide... i didn't actually look over all of what you have ... but hopefully you get the idea? Link to comment Share on other sites More sharing options...
acidfear Posted April 23, 2007 Author Share Posted April 23, 2007 Well i guess from a logical stand point you'd probably want to add some code in the send/rec loops on the cleint/server. You'd send code to the server on your logout funciton from the client. When the server realises this it would send some data to all the clints informing them of this. And in turn the cleints receive loop would have to have code to accept the incomming data.Just saying this as a general guide... i didn't actually look over all of what you have ... but hopefully you get the idea?Sounds like it could work. I'll keep messing around with it and post any updates. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now