bizchat-6.2.0
توضیحات
import this library to use chat from client to server directly
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Microsoft :: Windows :: Windows 10 |
| نام فایل | bizchat-6.2.0 |
| نام | bizchat |
| نسخه کتابخانه | 6.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | mayur |
| ایمیل نویسنده | mayurdhameliya98@gmai.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/bizchat/ |
| مجوز | MIT |
( " client-server socket chat" )
Quick start
-----------
Installing
----------
To install the library to your bot, run the command:
pip install bizchat
To install the repository, run the command:
Usage
-----
**Basic Usage**
.. code:: py
from socket import*
import socket
def server():
hostname = socket.gethostname()
local_ip = socket.gethostbyname(hostname)
print(hostname, local_ip)
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
address = input("enter address : ")
port = int(input("Enter Port : "))
server.bind((address, port))
server.listen()
print("server listening...")
connection, address = server.accept()
print("connected to client...")
while True:
data = input("server : ")
connection.send(bytes(data, 'utf-8'))
recdata = connection.recv(1024).decode()
print('client : ', recdata)
def client():
client = socket.socket()
address = input("enter address : ")
port = int(input("Enter Port : "))
client.connect((address, port))
print("connected to server..")
while True:
recdata = client.recv(1024).decode()
print('server : ', recdata)
data = input("client: ")
client.send(bytes(data, 'utf-8'))
نحوه نصب
نصب پکیج whl bizchat-6.2.0:
pip install bizchat-6.2.0.whl
نصب پکیج tar.gz bizchat-6.2.0:
pip install bizchat-6.2.0.tar.gz