Skip to content

wi6n3l/Simple-Socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Socket

Simple Socket is a module for python with the objective of simplify the socket connections for beginers.

Example of Server:

import SSocket

SSocket.Server_wait(connections, port)

SSocket.Server_accept()

print(SSocket.Read(1024, "ascii"))

SSocket.Write("'Handshake' Hi! I'm Server!", "ascii")

SSocket.Close()

Example of Client:

import SSocket

SSocket.Connect(ip, port)

SSocket.Write("'Handshake' Hi! I'm Client!", "ascii")

print(SSocket.Read(1024, "ascii"))

SSocket.Close()

Output of Server:

'Handshake' Hi! I'm Client!

Output of Client:

'Handshake' Hi! I'm Server!

To get connected client IP and Port use:

SSocket.connected

Dependencies:

  • socket module
  • time module

About

Simple Socket module for make socket conections in Python easyer, and fast for beginers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages