22 lines
459 B
C
22 lines
459 B
C
|
#include <proto/exec.h>
|
||
|
#include <dos/dos.h>
|
||
|
#include <proto/socket.h>
|
||
|
#include <arpa/inet.h>
|
||
|
#include <netinet/in.h>
|
||
|
|
||
|
int main(void) {
|
||
|
if (!(SocketBase = OpenLibrary("bsdsocket.library", 4))) {
|
||
|
printf("Can't open socket library\n");
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
serverSocket = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||
|
if (serverSocket < 0) {
|
||
|
printf("can't get a socket\n");
|
||
|
return 1;
|
||
|
}
|
||
|
|
||
|
CloseSocket(serverSocket);
|
||
|
CloseLibrary(SocketBase);
|
||
|
}
|