added full parameter set to pynorm.Session.setTxPort()
parent
cc3a29b025
commit
a1bb33c354
|
|
@ -63,20 +63,20 @@ extern const double NORM_DEFAULT_CONNECT_TIMEOUT;
|
|||
|
||||
NormSocketHandle NormOpen(NormInstanceHandle instance);
|
||||
|
||||
bool NormListen(NormSocketHandle normSocket,
|
||||
UINT16 serverPort,
|
||||
bool NormListen(NormSocketHandle normSocket,
|
||||
UINT16 serverPort,
|
||||
const char* groupAddr = NULL,
|
||||
const char* serverAddr = NULL);
|
||||
const char* serverAddr = NULL);
|
||||
|
||||
bool NormConnect(NormSocketHandle normSocket,
|
||||
const char* serverAddr,
|
||||
UINT16 serverPort,
|
||||
bool NormConnect(NormSocketHandle normSocket,
|
||||
const char* serverAddr,
|
||||
UINT16 serverPort,
|
||||
UINT16 localPort = 0,
|
||||
const char* groupAddr = NULL,
|
||||
NormNodeId clientId = NORM_NODE_ANY);
|
||||
|
||||
NormSocketHandle NormAccept(NormSocketHandle serverSocket,
|
||||
NormNodeHandle clientNode,
|
||||
NormSocketHandle NormAccept(NormSocketHandle serverSocket,
|
||||
NormNodeHandle clientNode,
|
||||
NormInstanceHandle instance = NORM_INSTANCE_INVALID);
|
||||
|
||||
void NormReject(NormSocketHandle serverSocket,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ def main(argv):
|
|||
(opts, args) = get_option_parser().parse_args(argv)
|
||||
|
||||
if len(args) != 1:
|
||||
print USAGE
|
||||
print(USAGE)
|
||||
return 1
|
||||
|
||||
pipep = PipeParser(opts.pipe)
|
||||
|
|
@ -53,7 +53,7 @@ def main(argv):
|
|||
except IndexError:
|
||||
continue
|
||||
pipep.reports.task_done()
|
||||
print "Exiting..."
|
||||
print("Exiting...")
|
||||
# g.reset()
|
||||
# g.close()
|
||||
# del g
|
||||
|
|
|
|||
|
|
@ -52,10 +52,10 @@ typedef uint32_t UINT32;
|
|||
// is removed, the API shouldn't be considered final.
|
||||
|
||||
#ifndef __cplusplus
|
||||
# include <stdbool.h>
|
||||
# define DEFAULT(arg)
|
||||
#include <stdbool.h>
|
||||
#define DEFAULT(arg)
|
||||
#else
|
||||
# define DEFAULT(arg) = arg
|
||||
#define DEFAULT(arg) = arg
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ class Session(object):
|
|||
def getNodeId(self):
|
||||
return libnorm.NormGetLocalNodeId(self)
|
||||
|
||||
def setTxPort(self, port):
|
||||
libnorm.NormSetTxPort(self, port)
|
||||
def setTxPort(self, txPort, enableReuse=False, txBindAddr=None):
|
||||
libnorm.NormSetTxPort(self, txPort, enableReuse, txBindAddr)
|
||||
|
||||
def setRxPortReuse(self, enable, rxBindAddr=None, senderAddr=None, senderPort=0):
|
||||
libnorm.NormSetRxPortReuse(self, enable, rxBindAddr.encode('utf-8'), senderAddr.encode('utf-8'), senderPort)
|
||||
|
|
|
|||
Loading…
Reference in New Issue