AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   socket_extention (https://forums.alliedmods.net/showthread.php?t=57471)

Ramono 07-05-2007 09:26

socket_extention
 
I'd like somthing like a socket_extention module, wich can listen at ports.
I saw this guy already had somthing like it, but he didnt reply any of my pm's

I cant code cpp, actualy the only language i know is amxx... not even html.

So, can anyone please create this nasty thing for me?

Thanks,
Ramon

Edit: he replyd on my pm:
Quote:

Originally Posted by DotNetJunkie in a PM
The custom socket module was coded for AMXX 1.60 I think using C++.
I don't know if I'll ever update it for 1.75 though.


Ramono 08-12-2007 14:09

Re: socket_extention
 
Please somone, I wanna make a servers side fast download plugin, some kind of web server.

hackziner 08-20-2007 11:37

Re: socket_extention
 
Maybe you should ask him the source code ... And we can try to do someting with it :)

I'm interesting by this module too, but I'm too lazy do something from scratch

sawce 08-20-2007 18:54

Re: socket_extention
 
It would be very, very difficult to implement something like this properly.

X-Script 08-21-2007 04:22

Re: socket_extention
 
Something like this will take time and alot of effort. I can personally do it if I had the time too. I'm taking College and i've also got work.

ps: cpp, is easy if you can understand the basics you basically got the whole language down.

Ramono 08-22-2007 07:43

Re: socket_extention
 
Quote:

Originally Posted by hackziner (Post 520882)
Maybe you should ask him the source code ... And we can try to do someting with it :)

I'm interesting by this module too, but I'm too lazy do something from scratch

pm'ed him

hackziner 08-22-2007 12:21

Re: socket_extention
 
You should stop the pm spam :)

Ramono 08-22-2007 13:03

Re: socket_extention
 
You should stop spamming useless messages ^^


Anyway, he replyd fast.
Quote:

Originally Posted by DotNetJunkie IN A PM!!11oneone
Sorry, I don't come on here often.

I'd have to dig for it since I don't remember where
I might have saved it.

Are you a coder?
Adding a socket_listen() function isn't very hard really,
especially if you know something about WinSock.

I think what I did was I made a socket_listen function
which setup the socket to act as a host and then
another function called socket_accept() which return
the next client in the connection que, if there is no
client then the returned handle will be NULL (zero).

It went something like that, I haven't worked with
sockets in awhile.

If you should decide to code your own module then
you will need to keep in mind portability so keep your
code compatible with both Unix sockets and Winsock,
usually by means of #ifdef WIN32's

If I should come across my old module I'll let you
know though.


hackziner 08-22-2007 13:28

Re: socket_extention
 
I spoke with him on aim ... He told me you were spaming him on pm ^^ ...

Thus he doesn't gave us the source :)

hackziner 08-22-2007 16:51

Re: socket_extention
 
3 Attachment(s)
Ok I've edited the socket module to add 2 functions ... But I've haven't test it yet, I've only check if it compile..

build for linux 1.76 ... I don't know if that work but ... that could perhaps work :)

I've add two function

socket_listen(...) same as socket_connect but the socket listen ( bind( for udp and tcp, + listen for tcp ). The address is still here but useless... I've hardcoded INADDR_ANY.

socket_accept(listenning socket)
Only for tcp, return a new socket with a connection attempt in the queue ...
return <0 if there is nothing in the queue ...


It's a 10 minuts try :) try if you really want a socket module that listen ...:) I'm not gonna to check it before this week end ^^


All times are GMT -4. The time now is 07:53.

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