Specials
Top sellers

UDP Socket

UDP Socket
Product Code: SD_Socket
Availability: In Stock
Built for: Windows/Android
Product Version: 1.0.1
Forum Link: http://www.shiva-engine.com/forum/viewtopic.php?t=30711
Req. ShiVa Version: ShiVa 1.9.2 Engines
Plugin Platform Compatibility: Android, Windows Legacy
Price: FREE $0
Seller information: Silicon Droid
Country: Spain
Company: Silicon Droid
Qty:     - OR -   Wish List
Compare

ZIP CONTENTS:

[1/3] = com.silicondroid.sdsocket.ste = THE ACTUAL PLUGIN
[2/3] = SD_Socket_TestGame.ste = A VERY MINIMAL TEST APP
[3/3] = SD_Socket_512x512.png = PLUGIN ICON

SD_Socket API: START

===============================================================================
nSocket = create ( nPortLocal, sAddressRemote, nPortRemote )
-------------------------------------------------------------------------------
Creates a non blocking UDP socket on the specified local port.
Will send data to the specified remote target address.
On success returns a socket identifier number to be used in all other functions.
On fail returns nil.
NOTE: sAddressRemote must be like "127.0.0.1", nPortRemote is any valid port number.

===============================================================================
sAddressRemote, nPortRemote = getRemoteAddress ( nSocket )
-------------------------------------------------------------------------------
Returns the remote target address and port number.

===============================================================================
bOK = setRemoteAddress ( nSocket, sAddressRemote, nPortRemote )
-------------------------------------------------------------------------------
Respecify a remote target address.
This will change the socket to transmit to the new end point.
The end point previously specified with create() will be cleared.

===============================================================================
nPort = getLocalPort ( nSocket )
-------------------------------------------------------------------------------
Returns the specified sockets local port number.

===============================================================================
bOK = sendString( nSocket, sString )
-------------------------------------------------------------------------------
Transmits a string using the specified socket.

===============================================================================
sString, sRemoteAddress, nRemotePort = receiveString ( nSocket )
-------------------------------------------------------------------------------
Receives a string using the specified socket.
The senders address and port are also returned.
If no data is available it will return immediately with nil, nil, nil.
Call this every frame for minimal latency.

===============================================================================
bOK = destroy ( nSocket )
-------------------------------------------------------------------------------
Destroy the specified socket instance.

SD_Socket API: END


PLEASE SEE THE ATTACHED TEST GAME STE FOR A LOOPBACK TEST EXAMPLE.

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:



ShiVa Store © 2017 - Powered By OpenCart