コード例 #1
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def recv(self, sock, bufsize, dispatcher, threaded=False):
     """receive some data from **sock**,
     - **bufsize** is the max size for the buffer.
     - **dispatecher** is a function handler that will manipulate the data
     - **threaded** if it is true a new thread wiill be created to avoid
         blocking the main process. Only real node suppport this. in sim
         Node and netns3 node, threading is not allowed.
     """
     abstract_method()
コード例 #2
0
 def stop_app(self, sock, app_name):
     """stop the app run on **sock** with app_name"""
     abstract_method()
コード例 #3
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def send(self, sock, data):
     """set **data** from sock."""
     abstract_method()
コード例 #4
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def bind(self, sock, port):
     """bind **sock** to **port**"""
     abstract_method()
コード例 #5
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def now(self):
     """get current time, either simulation time or real time."""
     abstract_method()
コード例 #6
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def ping(self, sock, data, threaded=False):
     """send ping traffic using **sock** and the server information is
     stored in **data**. A new thread will be created if the **threaded**
     is true
     """
     abstract_method()
コード例 #7
0
ファイル: Behaviour.py プロジェクト: hbhzwj/imalse
    def behave(): abstract_method()

from random import expovariate as exponential
コード例 #8
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def stop_app(self, sock, app_name):
     abstract_method()
コード例 #9
0
 def accept(self, sock):
     """accept from the **sock**, will return the accepted socket"""
     abstract_method()
コード例 #10
0
 def listen(self, sock, backlog):
     """listen to the **sock**. **backlog** is the max number of connection
     it can maintain"""
     abstract_method()
コード例 #11
0
 def bind(self, sock, port):
     """bind **sock** to **port**"""
     abstract_method()
コード例 #12
0
 def create_sock(self, desc):
     """create_sock with parameter specified by **desc**, **desc** can be the
     address and port it tries to connect and the type of the connection"""
     abstract_method()
コード例 #13
0
 def sleep(self, t, call_back=None):
     """sleep the node for a **t** seconds, if **call_back** is specified,
     it will be called after node wake from sleep"""
     abstract_method()
コード例 #14
0
 def now(self):
     """get current time, either simulation time or real time."""
     abstract_method()
コード例 #15
0
 def start(self):
     """start the node"""
     abstract_method()
コード例 #16
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def connect(self, sock, addr_port):
     abstract_method()
コード例 #17
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def close_sock(self, sock):
     abstract_method()
コード例 #18
0
 def send(self, sock, data):
     """set **data** from sock."""
     abstract_method()
コード例 #19
0
ファイル: Experiment.py プロジェクト: Sikkandar-Sha/imalse
 def node_num(self):
     abstract_method()
コード例 #20
0
 def connect(self, sock, addr_port):
     """connect the **sock** to the server with address and port specfied by
     **addr_port** """
     abstract_method()
コード例 #21
0
ファイル: Behaviour.py プロジェクト: hbhzwj/imalse
 def stage(): abstract_method()
 def behave(): abstract_method()
コード例 #22
0
 def sendto(self, sock, data, addr, port):
     """send **data** from **sock** to **addr** and **port**, use UDP
     protocol"""
     abstract_method()
コード例 #23
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def stop_app(self, sock, app_name):
     """stop the app run on **sock** with app_name"""
     abstract_method()
コード例 #24
0
ファイル: Experiment.py プロジェクト: JBonsink/GSOC-2013
 def node_num(self):
     abstract_method()
コード例 #25
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def create_timer(self, t, call_back):
     abstract_method()
コード例 #26
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def create_timer(self, t, call_back): abstract_method()
 #################################
 ###  Network Related          ###
 #################################
 def set_master_sock(self, sock): abstract_method()
コード例 #27
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def accept(self, sock):
     """accept from the **sock**, will return the accepted socket"""
     abstract_method()
コード例 #28
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def set_master_sock(self, sock): abstract_method()
 @property
コード例 #29
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def sendto(self, sock, data, addr, port):
     """send **data** from **sock** to **addr** and **port**, use UDP
     protocol"""
     abstract_method()
コード例 #30
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def client_socks(self): abstract_method()
 #### Socket API ####
 def create_sock(self, desc):
コード例 #31
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def send(self, sock, data):
     abstract_method()
コード例 #32
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
    def recv(self, sock, bufsize, dispatcher, threaded=False): abstract_method()

    def send(self, sock, data): abstract_method()
コード例 #33
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def sendto(self, sock, data, addr, port):
     abstract_method()
コード例 #34
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def connect(self, sock, addr_port): abstract_method()
 def sendto(self, sock, data, addr, port): abstract_method()
コード例 #35
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def http(self, sock, data, threaded=False):
     abstract_method()
コード例 #36
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def sendto(self, sock, data, addr, port): abstract_method()
 def close_sock(self, sock): abstract_method()
コード例 #37
0
ファイル: Experiment.py プロジェクト: Sikkandar-Sha/imalse
 def get_node(self, i):
     """get ith nodes"""
     abstract_method()
コード例 #38
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def close_sock(self, sock): abstract_method()
 #################################
 ###  Application Layer    #######
 #################################
 def ping(self, sock, data, threaded=False): abstract_method()
コード例 #39
0
ファイル: BotMaster.py プロジェクト: Sikkandar-Sha/imalse
    def recv_ack(self): abstract_method()

    def echo(self, sock, data):
コード例 #40
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def ftp(self, sock, data, threaded=False): abstract_method()
 def icmp(self, sock, data, threaded=False): abstract_method()
コード例 #41
0
ファイル: Behaviour.py プロジェクト: hbhzwj/imalse
 def stage(self):
     abstract_method()
コード例 #42
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def http(self, sock, data, threaded=False): abstract_method()
 def stop_app(self, sock, app_name): abstract_method()
コード例 #43
0
 def stage():
     abstract_method()
コード例 #44
0
ファイル: Node.py プロジェクト: JBonsink/GSOC-2013
 def start(self): abstract_method()
 #################################
 ###  Some Utility Function    ###
 #################################
 @property
コード例 #45
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def http(self, sock, data, threaded=False):
     abstract_method()
コード例 #46
0
ファイル: Behaviour.py プロジェクト: Sikkandar-Sha/imalse
    def behave(): abstract_method()

from random import expovariate as exponential
コード例 #47
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def start(self):
     """start the node"""
     abstract_method()
コード例 #48
0
ファイル: Behaviour.py プロジェクト: Sikkandar-Sha/imalse
 def stage(self):
     abstract_method()
コード例 #49
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def sleep(self, t, call_back=None):
     """sleep the node for a **t** seconds, if **call_back** is specified,
     it will be called after node wake from sleep"""
     abstract_method()
コード例 #50
0
ファイル: Behaviour.py プロジェクト: Sikkandar-Sha/imalse
 def stage(): abstract_method()
 def behave(): abstract_method()
コード例 #51
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def create_sock(self, desc):
     """create_sock with parameter specified by **desc**, **desc** can be the
     address and port it tries to connect and the type of the connection"""
     abstract_method()
コード例 #52
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def start(self):
     abstract_method()
コード例 #53
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def listen(self, sock, backlog):
     """listen to the **sock**. **backlog** is the max number of connection
     it can maintain"""
     abstract_method()
コード例 #54
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def create_timer(self, t, call_back):
     abstract_method()
コード例 #55
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def set_master_sock(self, sock):
     abstract_method()
コード例 #56
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def client_socks(self):
     abstract_method()
コード例 #57
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def connect(self, sock, addr_port):
     """connect the **sock** to the server with address and port specfied by
     **addr_port** """
     abstract_method()
コード例 #58
0
ファイル: Node.py プロジェクト: Sikkandar-Sha/imalse
 def recv(self, sock, bufsize, dispatcher, threaded=False):
     abstract_method()
コード例 #59
0
ファイル: BaseNode.py プロジェクト: JBonsink/GSOC-2013
 def close(self, sock):
     """close the **sock**"""
     abstract_method()
コード例 #60
0
 def ping(self, sock, data, threaded=False):
     """send ping traffic using **sock** and the server information is
     stored in **data**. A new thread will be created if the **threaded**
     is true
     """
     abstract_method()