Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [socket]

An endpoint of a bidirectional inter-process communication flow. This often refers to a process flow over a network connection, but by no means is limited to such.

1
vote
0answers
18 views

Managing multiple sockets in a network client in Python

I'm writing a small FIX client in Python (2.7, constraint I cannot waive for now, unfortunately). There will be multiple sockets, connecting to different ports, so I thought I'd create a ...
1
vote
1answer
55 views

Python Making Bruteforce Password Crack Faster

I made a simple password cracker using Python. But it's extremely slow. Here is my code: ...
2
votes
1answer
35 views

Await socket Response

I wrote this to make the "callback hell" more manageable on the part of the coder when using Socket IO, so that there wasn't really any callback hell to go with, just a simple await. This should work ...
2
votes
2answers
136 views

Simple multithreaded chat server in Rust

I'm trying to develop a simple Rust chat server. I'm not a Rust expert and come from Java and Kotlin. This same server in Kotlin is: ...
4
votes
0answers
45 views

Socket client-server app for exchanging sine-wave points

I wanted to try C# network programming and wrote this simple client/server application. The idea is - many clients can connect to server and request some data. As an example they request a set of ...
1
vote
1answer
256 views

A Simple C++ Client That Sends Data Over TLS Using OpenSSL

I am learning C++ and socket programming and OpenSSL. As such, I decided to make a simple client that opens a TLS connection and writes some data as practice. It also serves as a base for more complex ...
1
vote
1answer
133 views

Multithreaded non-blocking tiny echo server

I wrote this code to make a non-blocking server without using select(), my main concern is to catch as many exceptions as possible for worst case scenarios (so I ...
2
votes
0answers
43 views

Gomoku game with socket client(multithread) and server

I've write a gomoku terminal game with socket client and server. The main suggestions I am looking for: Am I using the multithread in right way? As when I tried to migrate the terminal game to GUI(...
0
votes
1answer
66 views

Game Server application

I'm trying to write game server core that I can easy extend to use for various games. From simple online Blackjack session, to MMORPG. Long story short, I came up with this solution: Firstly, we have ...
2
votes
4answers
187 views

Simple port scanner in Python 3

I wrote a simple python port scanner today and I would like to get some advice on how to improve on the code in different ways. I am aware that I can implement threading to reduce runtime but I won't ...
6
votes
2answers
390 views

UDP Reverse Shell

I'm currently learning python / network programming altogether and I coded this simple python reverse shell; I would like to hear any remarks from you regarding code structure, any common beginner ...
3
votes
1answer
106 views

Java Messenger data transmission

This is a very simple concern, could somebody take a look at a few lines of my code? I'm writing a simple Java multi-user messenger, it is structured in a desktop client with a Swing GUI, a java ...
-1
votes
1answer
87 views

Scanning the subnet by ip range

By applying the get_name and get_mac functions to the specified IP address, it is possible to estimate the network availability ...
6
votes
1answer
64 views

Response dispatcher for HTTP server

I’m writing a small HTTP server (just for fun and education). One important part is the response dispatcher. Responses for each socket should be sent in the order the requests were received. The idea ...
6
votes
2answers
657 views

Network Interface Object

I wrote a Network... thing (not really telnet); and it's pretty simple. No options, just straight I/O. It seems programs get so bloated easily. ...
3
votes
1answer
143 views

Socket server in c#

I'm writing a socket server for a project I am working on. I'm used to working in .NET FW, but I'm attempting to write this using .NET standard/core. Particularly, I am concerned about managing ...
2
votes
1answer
98 views

Actively writing an HTTPS webserver in Python 3

Please help me improving this existing, working code. I am not asking you to change what it does, as it handles connections already perfectly as designed by my own specs. I just want the code to be ...
3
votes
0answers
81 views

Large file transmission over socket in Python

To learn network programming in Python, I have written a small piece of code which is constituted of 2 modules, a client and a server. The server listens to a specific port provided on command line, ...
1
vote
1answer
135 views

cwe119.py - a semi-automated script to test your security against DoS attacks

What is it used for? This is a different script from any python script which performs DoS attacks. It's designed to practice parameters fuzzing in the requests (it's requested which parameter you ...
3
votes
2answers
107 views

Send and Receive upto 200KB over TCP/IP socket

Code reviewers, I have changed code whatever be suggested by code reviewer and I want you to give me some feedback on the basis of my new code. I have written TCP server client code to send data of ...
3
votes
1answer
73 views

Construct and send an HTTP get request from scratch and print all the received data to the screen

My concerns: Is the code pythonic? Does the receive_all function make the code any cleaner or should that functionally be apart of the ...
5
votes
2answers
294 views

Send and Receive more than 64KB over TCP/IP socket

I have written TCP server client code to send data of any size (1 byte - 64KB) in a loop. The client (A) sends data to the server (B). B then sends the same data back to A. A matches the sent data to ...
3
votes
1answer
368 views

Server and client for pong game

This is a pong style game which is very basic but involves sending and receiving data using TCP. The data is encoded using pickle which seems to be very inefficient yet I am still using it. The ...
6
votes
0answers
950 views

Non-blocking C++ sockets [closed]

I'm trying to use sockets to create a simple client and server architecture and I'm wondering if there is any other way to create non-blocking, 'async' sockets instead using ...
0
votes
0answers
95 views

Implementation of ring buffer for reading from socket

I have implemented a simple ring buffer for providing a buffered read from a socket as shown below. I would like to get it reviewed for following things: Understand where it can be improved, if it ...
5
votes
1answer
123 views

Deal with partial messages using SocketAsyncEventArgs

As you know, when dealing with SocketAsyncEventArgs, this is possible to receive partial messages and depending on the protocol used, you have to deal with it. In ...
4
votes
1answer
86 views

Handling a single connection to a server or client

I'm writing an asynchronous TCP server and client for a game in C# and in particular getting sending right is a bit tricky because calling BeginSend() before ...
7
votes
1answer
1k views

Event-based multi-client socket wrapper

For learning purposes I am trying to develop an event-based library/wrapper to communicate with many clients by using epoll. The wrapper was designed with the ...
3
votes
2answers
2k views

“Always stay connected” mechanism for socket connection

I'm calling Connect() for the first time I connect, I am then checking if the connection is still connected every 10 seconds if it is not connected it attempts to ...
0
votes
1answer
59 views

First Time Programming Sockets

The following code was my first attempt at creating and manipulating socket variables. I compiled and ran the code through cmd. What are the most common ways to organize methods in both a server and ...
4
votes
1answer
373 views

C++ Poll Socket Wrapper Linux

So I created a C++ socket wrapper class using poll and events. The creation of the listening socket and binding is already handled in the initialize() method. I'd ...
2
votes
0answers
47 views

Write one string to a socket within 10 seconds or another string if the time is out

I have implemented a method which will send one data to the server if it (Raspberry Pi Pin Input HIGH, in this case) occurs within 10 seconds. If this doesn't happen within 10 seconds then I should ...
1
vote
0answers
76 views

Server Client in socket c

This is a lib I am doing to interact with sockets. :) Here is the main file: ...
4
votes
1answer
429 views

Callback pattern for handling socket response

I am in the process of learning go and am coming from a PHP, JS, and Nodejs background. I created a package that is a client which connects to a socket server and processes the data received from ...
4
votes
1answer
238 views

A java IRC bot created for twitch

This is my Main class, all it does is start the bot object. ...
0
votes
0answers
5k views

Websocket server on C# to handle multiple clients

This is my test code for a websocket server to serve multiple clients simultaneously written in C#. The program listen for for new connections on 192.168.0.7 port 100. Multiple clients can be ...
1
vote
0answers
27 views

Asynchronously receiving data from a connected socket

Can anyone tell me if this is the right way to call BeginReceive asynchronously? The code works fine but I want to make sure. ...
1
vote
0answers
952 views

Async test client for TCP socket

I've made some modifications to the async client example found on MSDN for the purpose of testing a server application. It works entirely as I expect and/or want, even running multiple clients, but ...
10
votes
1answer
142 views

Point to point file transfer through HTTP socket

Why did I write this code This has a fun cartoon describing the problem of file transfer nowadays. And it's utterly true. There are already some webRTC based P2P file transfer services online. But I ...
3
votes
2answers
111 views

String Isolation Class

As a lone developer I don't really have anyone to peer review my work in-house so I was hoping someone could take a look at this class and tell me in what ways I could improve it. Essentially what ...
5
votes
2answers
419 views

The start of a Python port scanner

My concerns: Is this module thread safe? Is there any obvious performance issues I missed? Is there a better container type to use for GENERATED_ADDRESSES other ...
2
votes
1answer
2k views

File Transfer over TCP

I'm working on an Asynchronous TCP Client/Server using the old BeginXXX and EndXXXSocket API. The goal of this hobby project is ...
2
votes
0answers
699 views

Asynchronous sockets with begin/end and a state machine loop

Disclaimer: I am a C++ guy, so my C# is not even close. Therefore some review might be helpful. Here is my 4th attempt at a client using asynchronous sockets. Please give feedback. The hardest part ...
6
votes
2answers
967 views

Networked Chat App in Python

I'm a highschool student with a passion for Python, and this is my first try at networking. GitHub server.py ...
1
vote
0answers
337 views

Socket server with consumer-producer design to handle concurrent connections

The usual way is to implement socket server to handle concurrent requests by creating new thread for each request. Instead of this approach i tried to create a server using ...
1
vote
0answers
708 views

Java Socket Proxy

I've been messing around with protocol handlers in Java, going so far as to write my own using a custom URLStreamHandler and ...
7
votes
1answer
1k views

C# Async Socket Wrapper

I'd like to get a little feedback on this async socket wrapper. My goal is to merge socket Begin/End methods into a single async call. I also wanted to wrap exceptions so they are easier to handle in ...
3
votes
1answer
224 views

Port Availability Scanner, written in Java (9)

For purpose of practice and experience, I was working on a "Port Availability Scanner" written in Java. So far it's working but it's really slow. Especially on relatively large quantities of ports (...
2
votes
0answers
118 views

Simple client/server library

I'm writing a Tamagotchi clone, and decided to try making an online version. Since I don't do a lot of networking projects, I decided to try and go off on a tangent and screw around with sockets and ...
3
votes
0answers
73 views

Live radio streamer

I've posted a repo on a live radio streamer much like shoutcast/icecast without admin panels / user panels or custom mounts. I was wondering if anyone could review it and tell me what I can do better ...