Skip to content

Instantly share code, notes, and snippets.

View tonghuikang's full-sized avatar
:octocat:
:/

Tong Hui Kang tonghuikang

:octocat:
:/
  • Singapore University of Technology and Design
  • Singapore
  • LinkedIn in/huikang-tong
View GitHub Profile
# -*- coding: utf-8 -*-
import socket
import os
print("Connecting...")
if os.path.exists("/tmp/python_unix_sockets_example"):
client = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
client.connect("/tmp/python_unix_sockets_example")
print("Ready.")
print("Ctrl-C to quit.")