Explore >> Select a destination


You are here

fdiv.net
| | gcher.com
21.7 parsecs away

Travel
| | Let say you want to add some script support to a C program, like lua or maybe even something simpler where all you can do is call a function with some given arguments: #include void my_func(int x, const char *s) { printf("my_func called with x=%d, s=%s\n", x, s); } int main() { // Will call my_func with 2 and "hello". script_call("my_func", 2, 'hello'"); } Since C does not support reflection, there is no way to implement the script_call function without some extra work.
| | 3.70.187.24
16.1 parsecs away

Travel
| |
| | yasoob.me
21.1 parsecs away

Travel
| | Hi there fellows. In this post I am going to take you on an adventure with python sockets. They are the real backbones behind web browsing. In simpler terms there is a server and a client. We will deal with the client first. So lets first begin by importing the socket library and making a simple socket. import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) Here we made a socket instance and passed it two parameters.
| | 0xboku.com
28.1 parsecs away

Travel
|