MCPcopy Create free account
hub / github.com/ReadyTalk/avian / create

Function create

classpath/sockets.cpp:48–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48SOCKET create(JNIEnv* e)
49{
50 SOCKET sock;
51 if (INVALID_SOCKET == (sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP))) {
52 char buf[255];
53 sprintf(
54 buf, "Can't create a socket. System error: %d", last_socket_error());
55 throwNew(e, "java/io/IOException", buf);
56 return 0; // This doesn't matter cause we have risen an exception
57 }
58 return sock;
59}
60
61void connect(JNIEnv* e, SOCKET sock, long addr, short port)
62{

Callers 1

Calls 2

last_socket_errorFunction · 0.85
throwNewFunction · 0.70

Tested by

no test coverage detected