def one(): socket_loop(('127.0.0.1', 21211), {'x': x}, socket=GreenSocket)
def one(): socket_loop(('127.0.0.1', 21211), {'x':x}, socket=GreenSocket)
def one(): socket_loop(("127.0.0.1", 21211), {"x": x}, socket=GreenSocket)
""" This is a sample demo showcasing file server, done by the pypy distribution library. Not counting __doc__ and initialization this is 2 line, fully operational file server, sample client which is in fileclient.py is included as well. run by: pypy-c fileserver.py pypy-c needs to be compiled with --allworkingmodules in order to have socket working. """ HOST = '127.0.0.1' # defaults to localhost, not to export your files PORT = 12221 from distributed.socklayer import socket_loop socket_loop((HOST, PORT), {'open': open})
""" This is a sample demo showcasing file server, done by the pypy distribution library. Not counting __doc__ and initialization this is 2 line, fully operational file server, sample client which is in fileclient.py is included as well. run by: pypy-c fileserver.py pypy-c needs to be compiled with --allworkingmodules in order to have socket working. """ HOST = '127.0.0.1' # defaults to localhost, not to export your files PORT = 12221 from distributed.socklayer import socket_loop socket_loop((HOST, PORT), {'open':open})
""" # things to export # function def f(x): return x + 3 # class class X: def __init__(self): self.slot = 3 def meth(self, f, arg): """ Method eating callable and calling it with an argument """ assert callable(f) return f(arg) # object x = X() # module import sys # constants HOST = '127.0.0.1' PORT = 12222 from distributed.socklayer import socket_loop socket_loop((HOST, PORT), globals())
# things to export # function def f(x): return x + 3 # class class X: def __init__(self): self.slot = 3 def meth(self, f, arg): """ Method eating callable and calling it with an argument """ assert callable(f) return f(arg) # object x = X() # module import sys # constants HOST = '127.0.0.1' PORT = 12222 from distributed.socklayer import socket_loop socket_loop((HOST, PORT), globals())