Skip to content

exante/python-protobuf-simple-socket-rpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protobuf Socket RPC

Simple helper to send and read protobuf messages to/from socket.

Example

import socket

from google.protobuf.message import Message

socket = SocketRPC(socket.AF_INET, socket.SOCK_STREAM)
socket.connect((host, port))

# in case if server requires handshake call
socket.handshake(b'AWESOME_RESPONSE', b'AWESOME_SERVER_PROTOCOL')

request = Message()
socket.send_message(request)
response = Message()
socket.read_message(response)

print(response)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages