You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
459 B
22 lines
459 B
#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);
|
|
}
|