What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-18 05:50:18
python walkie talkie
import sys import os import socket import time sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.settimeout(2) if "--listen" in sys.argv: print("WalkieTalkie Listener Turned On..") server_address = ('', 9434) so... Add solution -
Javascript 2022-01-30 11:35:55
socket io react js
import React, { useState, useEffect } from "react"; import socketIOClient from "socket.io-client"; const ENDPOINT = "http://127.0.0.1:4001"; function App() { const [response, setResponse] = useState(""); useEf... Add solution -
Python 2022-01-24 04:47:09
send get request python socket
import socket target_host = "www.google.com" target_port = 80 # create a socket object client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # connect the client client.connect((target_host,target_port)) # send... Add solution -
TypeScript 2021-11-20 18:20:17
multiple clients in socket programming python
import socket ClientSocket = socket.socket() host = '127.0.0.1' port = 1233 print('Waiting for connection') try: ClientSocket.connect((host, port)) except socket.error as e: print(str(e)) Response = ClientSocket.recv(1024) while True: Inpu... Add solution -
Python 2021-11-17 11:49:13
python network programming
#!/usr/bin/env python3 import socket HOST = '127.0.0.1' # Standard loopback interface address (localhost) PORT = 65432 # Port to listen on (non-privileged ports are > 1023) with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.b... Add solution -
Javascript 2021-11-16 21:11:13
react native socket io
import React, { useState, useEffect } from "react"; import socketIOClient from "socket.io-client"; const ENDPOINT = "http://127.0.0.1:4001"; function App() { const [response, setResponse] = useState(""); useEf... Add solution -
Python 2021-11-15 20:20:18
python tcp socket example
import socket TCP_IP = '127.0.0.1' TCP_PORT = 5005 BUFFER_SIZE = 1024 MESSAGE = "Hello, World!" s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((TCP_IP, TCP_PORT)) s.send(MESSAGE) data = s.recv(BUFFER_SIZE) s.close() print "... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5