Skip to content

Commit

Permalink
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -972,6 +972,21 @@ public int getnameinfoNullService(DynamicObject sa, int salen, DynamicObject hos

}

@CoreMethod(names = "shutdown", isModuleFunction = true, required = 2)
public abstract static class ShutdownNode extends CoreMethodArrayArgumentsNode {

public ShutdownNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@CompilerDirectives.TruffleBoundary
@Specialization
public int shutdown(int socket, int how) {
return nativeSockets().shutdown(socket, how);
}

}

@CoreMethod(names = "socket", isModuleFunction = true, required = 3)
public abstract static class SocketNode extends CoreMethodArrayArgumentsNode {

Original file line number Diff line number Diff line change
@@ -118,4 +118,10 @@ public interface NativeSockets {

int connect(int socket, Pointer address, int address_len);

/**
* int shutdown(int sockfd, int how);
*/

int shutdown(int socket, int how);

}

0 comments on commit 4ef1514

Please sign in to comment.