Skip to main content

All Questions

Tagged with
-3 votes
1 answer
116 views

How to interface with a UNIX port? [closed]

I have encountered this same question in numerous forms over the past year, and have not been able to find the solution I am after. As the question has yet again reared its head, I am asking here with ...
BrownianBridge's user avatar
1 vote
0 answers
70 views

How to manage responses from multiple measuring devices to a single TCP/IP port for time sensitive applications?

I am very new to Socket programming, and I would appreciate any input you have in my question. I am a physicist working on a project where the time intervals and coincidence of measurements play a big ...
Sougandh Km's user avatar
-1 votes
1 answer
76 views

Winsock client not connecting to any server

I made two separate C programs using Visual Studio 2022, A client application and a server application, but my client app cannot connect to any external servers, including google.com. My server works ...
Prasant Aryal's user avatar
2 votes
1 answer
295 views

Override open function using LD_PRELOAD

I already made a library that i override the readdir function and I use it to cover up some processes, and now am trying to override the open function, in order to hide a port that is opened, this is ...
Andreas Frangos's user avatar
-1 votes
1 answer
85 views

how to specify ports number for both sides of a tcp connection (client and server side) in c using sockets

I am trying to replicate this diagram in C: I have created the request line connection fine, but I can't find any information that has worked on how to create a connection where both sides have ...
Echidno's user avatar
0 votes
2 answers
166 views

How to detect If a digital pin is blinking (from high to low) in C?

I am writing a firmware application. I must read a GPIO pin connected to a smart battery, which communicates the state of the battery. A high value in the pin means the battery is in an unknow state, ...
cercio's user avatar
  • 89
1 vote
1 answer
71 views

c-code does not correctly poll/interrogate an instrument connected through serial port

I am writing a c program to log data that arrives via serial port from an instrument. The instrument is interrogated using various ascii characters terminated in a single carriage return. The ...
Markys's user avatar
  • 33
0 votes
1 answer
412 views

Unable to see the data sent from STM32 over virtual COM port to PC

I am trying to learn STM32 programming and trying to send a sample text from the microcontroller to the PC. Here is the code : #include "main.h" \#include "usb_device.h" /\* ...
Theja's user avatar
  • 65
0 votes
2 answers
568 views

Assemble a struct from Bytes received through serial port in C#

In C I simply do a memcpy from my data buffer array to the address of my struct. I am not sure how to do this in C# for the desktop side of things. This is my struct in C# struct frame_type { ...
Edwin Fairchild's user avatar
-2 votes
1 answer
1k views

Socket programming chat application

I made a chat application using sockets in c language. When i run server and client on same device it works fine. But, when i run client and server on different device client shows connect error. is ...
Abhijay7's user avatar
2 votes
1 answer
769 views

Define Source port of tcp socket SOCK_STREAM

i want to define the sourceport(localport) of this socket connection -- some help plox xD if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1) { continue; } // Set it in ...
Mohamed Abdel Fattah's user avatar
0 votes
0 answers
153 views

Send a message to a webserver using only the client ephemeral port

I'd like to send a message to a server without actually sending any data. For example, specifying a client ephemeral port 7273 (is HI in ASCII) Successively connecting using ports 7279, 8732, 6582, ...
vengy's user avatar
  • 2,125
0 votes
1 answer
1k views

receiving udp packets from a specific client

I am trying to implement UDP Server with "accept" function like the one in TCP. That because I need to keep one channel for each client. My question is how to let the UDP socket receiving ...
Karam's user avatar
  • 13
0 votes
2 answers
126 views

a random port is chosen while initing socket [closed]

int create_socket(struct in_addr *ip, unsigned int port) { int s = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in sin; memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; ...
Mr P's user avatar
  • 113
0 votes
0 answers
123 views

How to assign incoming packet's source port to outgoing packet destination port -- TCP C Linux

I like to know the source port of packet in tcphdr can be assigned to destination port of ip like this source_ip_tcph->source= dest_ip_tcph->dest; source_ip_tcph->dest = ...
user786's user avatar
  • 4,254

15 30 50 per page
1
2 3 4 5
10