-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetwork.bi
More file actions
21 lines (16 loc) · 1.77 KB
/
Network.bi
File metadata and controls
21 lines (16 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef unicode
#define unicode
#endif
#include once "windows.bi"
#include once "win\winsock2.bi"
#include once "win\ws2tcpip.bi"
' Соединиться с сервером и вернуть сокет
Declare Function ConnectToServer(ByVal sServer As WString Ptr, ByVal ServiceName As WString Ptr, ByVal localServer As WString Ptr, ByVal LocalServiceName As WString Ptr)As SOCKET
' Создать сокет, привязанный к адресу
Declare Function CreateSocketAndBind(ByVal sServer As WString Ptr, ByVal ServiceName As WString Ptr)As SOCKET
' Создать прослушивающий сокет, привязанный к адресу
Declare Function CreateSocketAndListen(ByVal localServer As WString Ptr, ByVal ServiceName As WString Ptr)As SOCKET
' Закрывает сокет
Declare Sub CloseSocketConnection(ByVal mSock As SOCKET)
' Разрешение доменного имени
Declare Function ResolveHost(ByVal sServer As WString Ptr, ByVal ServiceName As WString Ptr)As addrinfoW Ptr