Added some API commands for use with a mobile app #391
|
@ -101,10 +101,8 @@ def assembleVersionMessage(remoteHost, remotePort, myStreamNumber):
|
||||||
|
|
||||||
random.seed()
|
random.seed()
|
||||||
payload += eightBytesOfRandomDataUsedToDetectConnectionsToSelf
|
payload += eightBytesOfRandomDataUsedToDetectConnectionsToSelf
|
||||||
userAgent = '/PyBitmessage:' + shared.softwareVersion + \
|
userAgent = '/PyBitmessage:' + shared.softwareVersion + '/'
|
||||||
'/' # Length of userAgent must be less than 253.
|
payload += encodeVarint(len(userAgent))
|
||||||
payload += pack('>B', len(
|
|
||||||
userAgent)) # user agent string length. If the user agent is more than 252 bytes long, this code isn't going to work.
|
|
||||||
payload += userAgent
|
payload += userAgent
|
||||||
payload += encodeVarint(
|
payload += encodeVarint(
|
||||||
1) # The number of streams about which I care. PyBitmessage currently only supports 1 per connection.
|
1) # The number of streams about which I care. PyBitmessage currently only supports 1 per connection.
|
||||||
|
|
Reference in New Issue
Block a user