Raised This Month: $51 Target: $400
 12% 

[EXTENSION] Socket (3.0.1)


Post New Thread Reply   
 
Thread Tools Display Modes
WakiMiko
Junior Member
Join Date: Jun 2009
Old 07-31-2009 , 19:33   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #141

How can I reconnect a socket that got disconnected? i tried re-using the handle and calling SocketConnect(socket, OnSocketConnected, OnSocketReceive, OnSocketDisconnected, HOST, PORT) again, I tried closing the socket before creating a new handle and connecting with that, but neither seems to work.
WakiMiko is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 07-31-2009 , 19:50   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #142

do SocketDisconnect(socket); in OnSocketDisconnected, instead of closing the handle, worked for me.
Chris-_- is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 07-31-2009 , 20:38   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #143

SocketDisconnect won't free the handle.

@WakiMiko
Both methods should work. Which version of the extension do you use?
sfPlayer is offline
WakiMiko
Junior Member
Join Date: Jun 2009
Old 07-31-2009 , 20:50   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #144

chris: that just gives me: "[SM] Native "SocketDisconnect" reported: Socket is not connected/listening"


I'm using the version attached in this post: http://forums.alliedmods.net/showpos...9&postcount=83 (sm exts list says 2.4.0)


I'm trying to do the following: the sockets extension connects to a server, then upon connect it sends a password (i have that in OnSocketConnected()). if the server doesn't receive the right password it disconnects the client. this all works fine for the initial connection. if the connection is interrupted for whatever reason, the server goes back to listening for clients. i want my plugin to try to reconnect to the server, but it never seems to send the password.

Last edited by WakiMiko; 07-31-2009 at 21:01.
WakiMiko is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 07-31-2009 , 21:27   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #145

Please test this one: http://forums.alliedmods.net/showpos...&postcount=123
sfPlayer is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 07-31-2009 , 22:26   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #146

Quote:
Originally Posted by sfPlayer View Post
SocketDisconnect won't free the handle.

@WakiMiko
Both methods should work. Which version of the extension do you use?
Sure works for me, i'm closing the handle on Mapend.
Chris-_- is offline
WakiMiko
Junior Member
Join Date: Jun 2009
Old 08-01-2009 , 08:55   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #147

sfPlayer: Unfortunely my server is running windows so i would need the .dll version.
WakiMiko is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 08-06-2009 , 08:30   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #148

Quote:
Originally Posted by WakiMiko View Post
sfPlayer: Unfortunely my server is running windows so i would need the .dll version.
I'm pretty sure he never released one
Dragonshadow is offline
Lethal-
Member
Join Date: Jun 2009
Old 08-06-2009 , 14:49   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #149

In the example.sp it mentions stripping the HTTP header, how do you do this? I can't work it out.
Lethal- is offline
Duchu
Junior Member
Join Date: Jan 2008
Old 08-06-2009 , 17:34   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #150

Code:
L 08/06/2009 - 23:29:43: [SOCKET] [Debug] SocketCreate: Socket created (handle 1844250006)
L 08/06/2009 - 23:30:44: [SOCKET] [Debug] SocketCreate: Socket created (handle 1988429238)
L 08/06/2009 - 23:31:44: [SOCKET] [Debug] SocketCreate: Socket created (handle 2080376142)
L 08/06/2009 - 23:32:45: [SOCKET] [Debug] SocketCreate: Socket created (handle -2116811464)
I've got 30 pages a4 daily filled with this. What should I do?
Duchu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode