169 Topics
| |
heyy guys.. m implementing PEER TO PEER FILE TRANSFER.. What protocol should I use? TCP or UDP? And why? | |
Hi,my friend and I are making our student project.And so far we create our 'back end' but in front (angular) somehow we are not able to get new socket.id when user change room.I will share your code with me hope someone will be able to help. This is our ANGULAR … | |
When working with TCP client sockets I often find myself frustrated with the lack of event-driven support. I usually end up writing a whole bunch of code to determine disconnects, reconnecting, etc and I figuired it's time to just write my own class for this stuff. I figuired I'd share … | |
I am making a program, and I don't know why my program becomes unresponsive, when I click the button ): I have a feeling its because of this: "connection = server.accept();" I don't know how to fix it. I am trying to recreate this: https://stackoverflow.com/questions/18505123/how-to-use-client-chat-on-different-pc but in javafx. package yeetYeet; … | |
Is it possible to know which connection sent data wiht recv()? Current setup is - Main Thread spins and waits - Thread 1 - do stuff unimportant to socket - Thread 2 - accept() -> keep linked list of accetpted sockets - Thread 3 - recv() -> can I know … | |
Hello, on Hotmail/Outlook webmail, when I receive an email message in the spam folder (formally Junk), I can mark the message as **Not Junk**. The server will then start to deliver the messages from that source, directly into the Inbox, working like a whitelist. Is it possible to do the … | |
Hi Dw. I have a MySql server database, and I'm polling data from the database. The problem I'm getting is that when I'm retrieving users activities I only get the first record only which is on `Row(0)` or the first record with that username. Suppose I have a database like … | |
I'm writing a simple server allowing me and my friends to send information to each other. Currently I've got the client down easy enough, it's all set up and I can communicate with servers. The problem is I can't get the server to work for some reason, I use working … | |
Dear all I am trying to send request to client device in Hex format and receive data into decimal format. By seeing forum and tutorial class. I could able to send and receive data from client device.Now I wanted to check the data i received valid or not. In order … | |
Hey everyone, I'm looking for some help with coming up with a system to communicate data between client and server sockets. I was thinking of a command system, but that would only work when the client is sending a request to the server, not when the server is returning data … | |
Hi Dw. I am developing a client server multi-thread application. This application uses signals(certain messages as signals), in order to perform a task for a client. For instance if a client wants to login, the client send a message as: `Login:<username>:<password>` and on a server I first check if the … | |
I have done a socket programming using bonecp as the database pooling for mysql. Suddenly I notice a lot of socket connection made but then after a few hours I got too many open files. I have set the timeout but somehow it did not timeout I don't know why. … | |
xml file <?xml version="1.0" encoding="UTF-8" standalone="no"?><movies> <movie id="1111"> <title>Blackhat</title> <genre>thriller</genre> <duration> 90 mins </duration> <age>28</age></movie> <movie id="1002"> <title>The Wedding Ringer</title> <genre>comedy</genre> <duration> 100 mins </duration> </movie> <movie id="1003"> <title>The Avengers</title> <genre>action</genre> <duration> 180 mins </duration> </movie> <movie id="1004"> <title>Taken 3</title> <genre>action</genre> <duration> 100 mins </duration> </movie> <movie id="1005"> <title>Insurgent</title> <genre>Science … | |
try { File file = new File("/Users/Alex Ting/Desktop/test2/MovieList.xml"); DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = dBuilder.parse(file); NodeList movielist = doc.getElementsByTagName("movie"); for(int i =0;i<movielist.getLength(); i++){ Node m=movielist.item(i); if(m.getNodeType()==Node.ELEMENT_NODE){ Element movie = (Element) m; String movieID = movie.getAttribute("id"); NodeList mnamelist=movie.getChildNodes(); for(int j=0;j<movielist.getLength(); j++){ Node n = mnamelist.item(j); if(n.getNodeType()==Node.ELEMENT_NODE){ Element name = (Element) … | |
I want to pass the string from client to server and the server will display the string. First the client enter the option 1 and the server will reply ask from the movie name. My problem is i cannot enter the name from client and send it to server and … | |
Hi, so I've got this multithreaded server which correctly waits for clients and assigns them to a worker thread. From there, the client is sent an object `Packet` which contains variables `Player` and `Round` (simplified, it contains more data but these are the most important). I'm building a simple top … | |
I am Developing an Client Server socket application .Am reading Strings in server side for multiple clients inside run(override) method and I getting EOF Exception at readUTF. I Dont know why the error is comming and how to rectify it. while (ss.compareTo("true") == 0) { System.out.println("Waiting for port " + … | |
Now am working with java application . I have to connect server and client through No-Ip Duc host.Is it possible or not??? Server side code: ServerSocket ss=new ServerSocket(5223); System.out.println("Waiting for client"); Socket soc=ss.accept(); System.out.println("Connected"); client side code: Socket soc=new Socket("rmcsnoiptest.ddns.net", 5223); This is what i tried. | |
I have this code. Its not the entire code because its a Blender addon with many lines that are unrelated to sockets so I give here only the part that deals with the sockets which I kept isolated from the rest of the program. def create_thread(): global threadSocket,listening threadSocket = … | |
Hello, I have two applications; a server and a client which use simple TCP Sockets to connect to each other and send the data. The only problem I have is that I am struggling to associate usernames with the accepted sockets on the server. The server is able to accept … | |
Hello guys..!! I'm new to python and I have a task which require me to write a simple TCP server which will interact with the web browser. I have done some coding as well as researching over the internet to find relevant notes and materials but none helped. What I … | |
Here is my code. #include <iostream> #include <math.h> #include <winsock.h> #include <windows.h> #include<stdio.h> #include<stdlib.h> #include<string.h> using namespace std; int main() { SOCKET s; WSADATA wsadata; int error = WSAStartup(0x0202, &wsadata); //Did something happen? if (error) return false; //Did we get the right Winsock version? if (wsadata.wVersion != 0x0202) { WSACleanup(); … | |
I am using following gdiscreen() function which takes screenshot jpg image into buffer.I am sending this buffered image using sento() over UDP.I am unable to convert this char array data sent back into image .I appreciate any help you can provide void gdiscreen() { char buffer[61400]; using namespace Gdiplus; wchar_t … | |
I am new to socket programming.I am trying to send datagrams containing image data(jpg) from one host to another continuously.I want to use C++.I have not came across detailed steps on how to achieve this for images anywhere.can somebody explain or link me to such tutorials? | |
Hello, I am currently trying to use boost asio for IPC. I ran into 2 strange issues: 1) when using the acceptor class, when I bring my process up, I get the error 'Already open' when trying to listen. The port I am trying to bind to is definitely not … | |
import java.io.*; import java.net.*; import java.util.*; public class UselessHTTPServer04 { public static void main(String args[]) throws Exception { int port = Integer.parseInt(args[0]); ServerSocket serverSock=new ServerSocket(port); while(true) { Socket conn = serverSock.accept(); Scanner scanin = new Scanner(conn.getInputStream()); String line=null; int nlines=0; while (true) { line = scanin.nextLine(); if(line.length()==0) break; nlines = … | |
Similar to echoserver, but this one handles multiple clients by forking the process. | |
i have a simple note and images storing java program that stores data into the server..i'm confused about what to use for building the server..should the server be built using sockets?? or which listens for http requests (the client sends json data)?? could anyone please tell me which one would … | |
This is a simple echo server that I've written while learning sockets programming. Compile the server and run it. You can connect to it using telnet like this: telnet localhost 1337 Disconnect the client by typing "/quit" without quotes. | |
I am new to socket programming and I am trying to establish a connection between my client and server and if it's successful the user can 1) -Input message, the message will be send to the server -the server will send a "I got your msg" back to the client. … |
The End.