Vice City: Multiplayer

VC:MP Discussion => General Discussion => Topic started by: KAKAN on Aug 07, 2015, 11:07 AM

Title: What is the use of socket
Post by: KAKAN on Aug 07, 2015, 11:07 AM
What is the use of this sockets, plz tell me

## NewSocket
## Socket.Connect
## Socket.Delete
## Socket.Disconnect
## Socket.Send
## Socket.SendClient
## Socket.SetLostConnFunc
## Socket.SetNewConnFunc
## Socket.Start
## Socket.Stop
Title: Re: What is the use of socket
Post by: ysc3839 on Aug 07, 2015, 01:23 PM
You can see the source code. Here I give you the arguments of each function.
CSquirrelSockets NewSocket(string pszDataFunc)

CSquirrelSockets
    bool Connect(string szHost, int usPort)
    void Disconnect(int ucConn)
    void Send(string sz)
    void SendClient(string sz, int ucConn)
    void SetLostConnFunction(string sz)
    void SetNewConnFunc(string sz)
    bool Start(int usPort, int usMaxConns)
    void Stop()
    void Delete()

source code https://bitbucket.org/stormeus/0.4-sockets/
Title: Re: What is the use of socket
Post by: PlayerX on Aug 07, 2015, 01:28 PM
It is usually to connect to IRC.
Title: Re: What is the use of socket
Post by: Thijn on Aug 07, 2015, 03:36 PM
I've filled in the wiki (http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions#Socket_Functions_.28In_the_.22Socket.22_plugin.29).
Once the plugin gets a bug fixed I will post the example on there.
Title: Re: What is the use of socket
Post by: KAKAN on Aug 07, 2015, 05:02 PM
Okay Thanks, Solved, Topic Locked!