sockets plugin: request help
#4

Quote:
Originally Posted by Calg00ne
Посмотреть сообщение
Try using socket_send in the callback which is called once you have connected, so:

pawn Код:
public OnSocketConnect(address[], port) {
    if(strcmp(address, "127.0.0.1") != 0) // not a local connection!
        return socket_close();

    socket_send("yo");
    return 1;
}
I don't think you can just send "yo" though.
After some googling, I figured out I may need to stop the message with \r\n.
I've changed this but doesn't make a difference.

As what you said, if you can't just send "yo\r\n" after making a connection (which is why I made the timer, to make sure it is connected by giving it some handling time) then the plugin kinda is a waste isn't it?
Reply


Messages In This Thread
sockets plugin: request help - by maij - 17.04.2011, 16:36
Re: sockets plugin: request help - by maij - 19.04.2011, 08:13
Re: sockets plugin: request help - by Calgon - 19.04.2011, 09:05
Re: sockets plugin: request help - by maij - 19.04.2011, 13:38
Re: sockets plugin: request help - by Calgon - 19.04.2011, 13:48
Re: sockets plugin: request help - by maij - 19.04.2011, 14:37

Forum Jump:


Users browsing this thread: 1 Guest(s)