Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jakogut/netfork
https://github.com/jakogut/netfork
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jakogut/netfork
- Owner: jakogut
- Created: 2014-06-30T00:05:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-30T00:33:14.000Z (about 9 years ago)
- Last Synced: 2023-03-11T15:52:32.040Z (almost 2 years ago)
- Language: C
- Size: 3.91 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#netfork
=======
This is a shitty implementation of something like an RPC client and server in C (but it's really not, it's more like forking a function over a network). It works by abusing void pointers to throw type safety out the window so that it can send the server's memory contents (a function) over a network using raw sockets, directly into a client's memory page that's mapped writable and executable. The client then assigns that address to a function pointer and calls it.It works. I don't recommend you try it.
The data isn't serialized, just pulled right out from the server's memory without regard for architecture, instruction set extensions, or endianness. It doesn't so much as verify a checksum to ensure that the data hasn't been tampered with in transit.
No warranties, express or implied. Not liable, blah blah blah...
## INSTRUCTIONS:
====### Server: bin/netfork_server [port]
### Client: bin/netfork_client [addr] [port]