Examples of SocketHandle


Examples of org.perl6.nqp.io.SocketHandle

    public static SixModelObject socket(long listener, ThreadContext tc) {
        SixModelObject IOType = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.ioType;
        IOHandleInstance h = (IOHandleInstance)IOType.st.REPR.allocate(tc, IOType.st);
        if (listener == 0) {
            h.handle = new SocketHandle(tc);
        } else if (listener > 0) {
            h.handle = new ServerSocketHandle(tc);
        } else {
            ExceptionHandling.dieInternal(tc,
                "Socket handle does not support a negative listener value");
View Full Code Here

Examples of org.perl6.nqp.io.SocketHandle

    }

    public static SixModelObject accept(SixModelObject obj, ThreadContext tc) {
        IOHandleInstance listener = (IOHandleInstance)obj;
        if (listener.handle instanceof ServerSocketHandle) {
            SocketHandle handle = ((ServerSocketHandle)listener.handle).accept(tc);
            if (handle != null) {
                SixModelObject IOType = tc.curFrame.codeRef.staticInfo.compUnit.hllConfig.ioType;
                IOHandleInstance h = (IOHandleInstance)IOType.st.REPR.allocate(tc, IOType.st);
                h.handle = handle;
                return h;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.