Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

src/m/o/mod-lang-jython-HEAD/src/main/api_shim/vertx.py   mod-lang-jython(Download)
from core.dns import DnsClient
from core.file_system import FileSystem
from core.datagram import DatagramSocket
from core.http import HttpServer, HttpClient
from core.net import NetServer, NetClient
def create_datagram_socket(ipv4=None):
    """ Return a datagram socket """
    if ipv4 is None:
        return DatagramSocket(org.vertx.java.platform.impl.JythonVerticleFactory.vertx.createDatagramSocket(None))
    elif ipv4:
        return DatagramSocket(org.vertx.java.platform.impl.JythonVerticleFactory.vertx.createDatagramSocket(org.vertx.java.core.datagram.InternetProtocolFamily.Ipv4))
    else:
        return DatagramSocket(org.vertx.java.platform.impl.JythonVerticleFactory.vertx.createDatagramSocket(org.vertx.java.core.datagram.InternetProtocolFamily.Ipv6))