Giter Site home page Giter Site logo

upopu's Introduction

UPOPU is a decentralized server network. Under development.

Coder: Meng Zhao May, 2013

Usage:

  • use upopu file I/O example. You'd like save some message to a file, and receive these from the same file, but different machine. Do like this:
    
	(from the first host)
	client1 $ echo "Hello! from client1" | dev/ufd.py

	(from the other host)
	client2 $ dev/ufd.py
	Hello! from client1
  • use upopu default server upopu has a buit-in server. It listens on port 1414, receive all connections from clients, and paring them.
	   
	(to start the server)
	$ bin/upopud
  • server side: start server:

	Python3.3
	>>> from upopu.core.upopu import UPOPUServer
	>>> UPOPUServer(51234).serve_forever()
  • client side: connect to other client:

	Python3.3(from client1)
	>>> from upopu.core.upopu import UPOPUSocket
	>>> sock = UPOPUSocket("remote_host", 51234, "Hellokey")
	>>> sock.connect()

	Python3.3(from client2)
	>>> from upopu.core.upopu import UPOPUSocket
	>>> sock = UPOPUSocket("remote_host", 51234, "Hellokey")
	>>> sock.connect()

	(client 1 send message to client2)
	>>> sock.write(b'hello! I am client1')

	(client 2 get messages from client1)
	>>> for line in sock.readlines(): print(i)
	b'hello! I am client1'

upopu's People

Contributors

fortable1999 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.