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

[EXTENSION] Socket (3.0.1)


Post New Thread Reply   
 
Thread Tools Display Modes
koshmel
Member
Join Date: Nov 2008
Old 11-30-2008 , 10:54   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #81

Simple plugin
upload file test.dem link write in result.txt\
need make more clear code.
write library.
Attached Files
File Type: sp Get Plugin or Get Source (example.sp - 285 views - 3.2 KB)
File Type: smx example.smx (2.9 KB, 203 views)
koshmel is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 11-30-2008 , 12:25   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #82

You can use ReadFileString(Handle:hndl, String:buffer[], max_size, 1); to read binary data if you use the latest 1.1 snapshot.
sfPlayer is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 12-07-2008 , 16:26   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #83

latest binaries for testing (linux + windows) version 1f48100743bce2707aa659049aa0626f2974abdc

put them into your addons/sourcemod/extensions folder

Last edited by psychonic; 03-05-2011 at 23:33. Reason: removed attachments due to source code not being available
sfPlayer is offline
exvel
SourceMod Donor
Join Date: Jun 2006
Location: Russia
Old 12-09-2008 , 08:54   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #84

Quote:
Originally Posted by sfPlayer View Post
latest binaries for testing (linux + windows) version 1f48100743bce2707aa659049aa0626f2974abdc

put them into your addons/sourcemod/extensions folder
It seems that now SocketDisconnect() works fine for my plugin.
Thank you very much sfPlayer!
__________________
For admins: My plugins

For developers: Colors library
exvel is offline
Send a message via ICQ to exvel
koshmel
Member
Join Date: Nov 2008
Old 12-27-2008 , 14:48   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #85

stupid question: how strip the http response header?
koshmel is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 12-27-2008 , 15:00   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #86

search for \r\n\r\n and cut the response there
sfPlayer is offline
koshmel
Member
Join Date: Nov 2008
Old 12-27-2008 , 15:23   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #87

don't work

decl String:part[300]
SplitString(receiveData,"/r/n/r/n", part, 300);
ReplaceString(receiveData, dataSize,part,"");

Last edited by koshmel; 12-27-2008 at 15:25.
koshmel is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 12-27-2008 , 15:30   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #88

\ != /
sfPlayer is offline
ogre_x
Member
Join Date: Dec 2008
Location: Sweden
Old 01-13-2009 , 11:06   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #89

Stupid question:

Can I use this to call an URL and only care about the HTTP response code? I'm thinking of contacting a http API, i.e.

http://somesite/someservice.url?some...=someotherdata
__________________

Last edited by ogre_x; 01-13-2009 at 11:13.
ogre_x is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 01-13-2009 , 14:58   Re: [EXTENSION] Socket (2.4.0beta+2.1)
Reply With Quote #90

Yes, see http://root.player.to/cgi-bin/gitweb...les/example.sp
sfPlayer 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 07:36.


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