Network and others

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

Hi Fred.

Some times ago you asked me to compile some needed NetworkCommands, here we go:

General Commands:
-------------------------------

GetSocketBufferSize() -> Returns the specified size of the Windows Socket-Buffer *
GetSocketBufferUsed() -> Returns the Bytes used in the Socket Buffer *
GetDomain() -> Returns the DomainName of the System
CoundDNS() -> Returns the Number of DNS specified in the System
GetDNS(num) -> Returns the IP of the requested DNS
CountIP() -> Returns the Number of IPs of the System *
GetIP(num) -> Returns the requested IP *
GetInetIP() -> Returns the Internet IP (If available) *
GetHostName() -> Returns the Hostname of the System
GetStructure(socket) -> Returns the Structure-Address of the Socket informations
GetSocketIP(socket) -> Returns the IP of the selected socket *

Server-Commands:
----------------------------
CloseClientConnection(socket) -> Forced the Client to disconnect *


Client-Commands:
---------------------------
ServerSocketEvent() -> Returns the Server-socket which couses an event (VERY importend for multiple connections to more then one server) *


Commands marked with a (*) are very importend to implement in my eyes. Hope I did not forgot anything.



Some other Remarks to the Sprite-Libs:
----------------------------------------------------------
Atm the Sprites are numbered by loading eg LoadSprite(num,path$).
I would prefer the Handle-Methode like hnd=loadsprite(path$) which returns the address of the sprite in memory or a DX-handle to it, thats the way Blitz do,
and its more modular I thing.


Okay, so far....

see you soon!

Mike

Tranquilizer/ Secretly!
Registred PureBasic User
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Some other Remarks to the Sprite-Libs:
----------------------------------------------------------
Atm the Sprites are numbered by loading eg LoadSprite(num,path$).
I would prefer the Handle-Methode like hnd=loadsprite(path$) which returns the address of the sprite in memory or a DX-handle to it, thats the way Blitz do,
and its more modular I thing.
Well you have to look with OS independent eyes.
The handle is AFAIK a Windows thingy.
So if something like a handle is needed, do it

hWnd = LoadSprite(num,path$)

Return 0 if it fails - return handle if all is ok!
BUT this is not working yet - maybe in the future.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 19 April 2002 23:40:43
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tranquil.

@Franco:

Why should this not be possible on amiga or linux too? Instead of a Handle LoadSprite can return the address in mem.

Mike

Tranquilizer/ Secretly!
Registred PureBasic User
Post Reply