FAQ Database Discussion Community


Read a TCP Message

android,sockets,tcp,client
I have a problem with TCP Connection (I've made a class extends Thread).I've implemented the read part with this code: byte[] bytes = new byte[1000]; StringBuilder reader = new StringBuilder(); int numRead = 0; if ((numRead = socket.getInputStream().read(bytes)) >= 0) { reader.append(new String(bytes, 0, numRead)); } this is the only...

How to reopen socket connection?

java,sockets,connection,client,server
How to reopen socket connection of the client, if sever was stopped then ran again? P.S. Maybe it is not necessary to view all the code, just look through the "wait" loop in the Client code. Socket socket = new Socket(ipAddress, serverPort); while (true) { line = keyboard.readLine(); try {...

Extension Library in Domino: Server or Client? Or both?

client,server,lotus-domino
this may seem like a dumb question but im not that long into Notes/Domino. I want to run Extension Library by openNTF. Now the question is, if i develop an application with it, can the application itself be used by other clients eventough they dont have the Ext. Lib. installed?...

Exampels on a Server-Client-Chat applikation on JAVA [closed]

java,netbeans,client,chat,server
I have been "googeling" around for a long time for examples over Server-client-chat application, but I can't really understand them. Many of them are using a class and creates the GUI from it, and I don't want to copy straight from it. Alot of examples doesn't either really explain how...

Show only some contents of a folder in a client/server in C

c,file,client,server
I'm developing a client/server program in C where I want to see the file contents in a folder. The program works, but I would to see only a .txt file, not all the files. How can I do this? Thank you! DIR *dp; int rv,rv1,stop_received,nread2; struct dirent *ep; char buffer[300],appoggio[1000],buffer2[300];...

Implementing an interface provided by a Client

java,interface,client,final
I have following task public class Event { private final Integer id; private final Collection<Market> market; private final Boolean completed; public Event(Integer id, Collection<Market> market, Boolean completed) { this.id = id; this.market = market; this.completed = completed; } public Integer getId() { return id; } public Boolean getCompleted() { return...

Server Side Implementation of requestAnimationFrame() in NodeJS

javascript,node.js,client,server
I have some questions regarding the wildly used requestAnimationFrame() functions. Recently I came across some implementation in multiplayer games who used it on the client instead of the server side. Is there any benefit in doing so? Can you reference me to any "best practices" server side implementation in NodeJS?...

GET and PUT commands with C++ Server-Client

c++,sockets,client,server
I'm trying to create a server, client put and get method but I don't really know where to start, how do I make the server run the commands I process. Any help would be much appreciated. Client file void Copy(char *filename1,char *filename2); int main(int argc, char **argv) { if(argc ==...

How to access the activity object in Android

java,android,client
MainActivity.java public class MainActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Client client = new Client(); try { client.connect("192.168.1.10",5555); } catch (IOException e) { e.printStackTrace(); } } public void displayServerAnswer(String answer){ TextView textView = (TextView)findViewById(R.id.mainTextView); textView.setText(answer); } ... Client.java import java.net.Socket; import java.io.PrintWriter;...

Checking if an element is in a hashmap between client and server

java,hashmap,client,server
I am using Java to try make a check on my server side on whether or not what the user sends over is in the hashmap, but my example will run with the name I've given regardless of whether its in the hashmap or not. Anyone know why this is...

symfony2 server design pattern best practice

rest,symfony2,titanium,client,server
So I'm about to create a mobile application using titanium. I want to use Symfony2 as the server and communicate via rest API's with the client (mobile) What I am asking is what are the best practices when it comes to designing my server? and what do you recommend I...

Is there something like the CAS Proxy ticket available in SAML?

proxy,client,single-sign-on,saml,cas
Is there something like the CAS Proxy ticket available in SAML? I want to make a request to a 3rd Service Provider with the identity of the user, like i can do with CAS Proxy ticket. So the Service Provider thinks the request comes from the user himself. Thanks in...

Java RMI client side

java,interface,client,rmi
I'm trying to use the RMI Client-Server communication. I wrote the following class/interface: Interface RemoteInterface extends Remote Class HelloStub extends UnicastRemoteObject implements RemoteInterface Class Server, which I binded the remote obj Class Client as follow: import java.rmi.*; public class Client { public static void main(String[] args) { try { String...

Apache commons tftp client, detecting not responding server

java,client,tftp,server-response
I wrote a simple TFTP client in Java, using org.apache.commons.net.tftp.TFTPClient. As server for testing i use tftpd64 and while it's running, everything works fine. But when there isn't any server running, functions sendFile() and receiveFile() are returning. I'm trying to catch SocketTimeoutExeption, but functions don't throw anything. I've checked packets...

does wsimport depend on the original source of the wsdl?

web-services,wsdl,client,jax-ws,wsimport
I'm learning about wsimport. In the examples I've seen, they show how to generate the wsdl from the server code, and then, how to use wsimport on the wsdl to generate the java client stubs. Does this imply that in order to use wsimport on the wsdl file, the wsdl...

Use cache-control header in a java client

java,http,caching,client,cache-control
From a Java application, using CXF, I call rest web services. The rest ws respond using HTTP Headers 1.1 cache-control (max-age, no-cache ...). From the java client, how can I use these headers? Are there any framework / tool / example to use them and to cache data as it...

Tcp server with accept list in C#

c#,tcp,client,server
I have a tcp server/client system , and I just want to accept specific clients, so I create an accept list and check client ip after accept it and then close the connection if it's not in the accept list. this solution leads to a performance problem because of the...

I can't figure out how to enter the recvfrom parameters in this UDP daytime client

c,udp,client
I'm making a simple UDP daytime client. I'm getting this when I try to compile. I've tried casting these to see if they would work but that doesn't lead anywhere. How should I go about entering these parameters with what I have (or am I missing something that should be...

Python Multiplayer noughts and crosses [closed]

python,http,client,server,multiplayer
So I made a single player noughts and crosses in Python a little while ago in school. score=[[' ',' ',' '],[' ',' ',' '],[' ',' ',' ']] global attempts attempts = 0 from random import randint from time import sleep def grid(): #draws playing grid hideturtle() speed(0) pensize(0) penup() setpos(-200,...

How to create zip file with maven: Java Client + JRE

java,maven,zip,client
I want to package a java client together with a runtime into one Zip-file. How should I do this with maven? Java Client: package com.test.client; public class Client { public static void main(String[] args) { System.out.println("Hello world!"); } } This runs like: java -cp "client.jar" com.test.Client I want to deliver...

DLNA/UPnP client ( that stream music/video ) on Ubuntu 14.04

ubuntu,client,upnp,dlna
We have a DLNA server in Windows 8 OS. the problem is, everybody that uses Windows, can easily stream music into the server (i mean play music from their PC's on the server), but i didn't found anything ( and i searched a lot ) in my Ubuntu 14.04 that...

Send a file from Client to a Server

c,file,sockets,client,server
I'm developing a client/server program in C. The server send to a client a txt file, but the name is like corrupt. The content is good, only the name is not good. Can someone tell me why? Thank you! This is the code who send the file: fd = open(appoggio1,...

C: sockets: can't read the whole server response

c,sockets,client
I'm programming in C an IRC chat client. everything it's working well except I can't read the whole answer sent by the server. here's the code: char buffer[2048]; write_on_screen(current_page(), "LOG COMMAND", command); write(sockfd, command, strlen(command)); //write to socket bzero(buffer, sizeof(buffer)); read(sockfd, buffer, sizeof(buffer)); write_on_screen(current_page(), "RESPONSE", buffer); return buffer; most of...

Correct way to write/read integers in C socket programming

c,sockets,client,server,read-write
I need to pass an integer from a TCP C server with the write() function and receive it in a client with the read() function. In my server, Let's say int check = 0 How can I send it with a write() function? I tried on my server: if (write(connfd,...

Locate Computer in Network topology

networking,location,client,topology
I ask myself that for some days now, and couldn't find a clear answer. Imagine a network with several rooms, each room with it's own (Layer 2) Switch. Those are then connected in star topology to another switch which is then connected to the router. All Clients get IPs from...

Eclipse Scout client unit tests

unit-testing,junit,client,eclipse-scout
I am trying to create some unit test for scout client elements. I have template for AbstractGroupBox, let say AbstractMyBox. I see that I need to have ScoutClientTestRunner for this, so I create simple example : @RunWith(ScoutClientTestRunner.class) public class MyyBoxTemplateTest { AbstractMyBox box; @Before public void createTemplate() throws Exception {...

Python 3 Using Sockets over the Internet

sockets,python-3.x,client,server
I have been trying to set up sockets that will work over the internet. I have search high and low through stack overflow and cannot seem to find the answer I need. When I run server.py I receive this error: Traceback (most recent call last): File "server.py", line 16, in...

Is there a command to get file history of a P4 client spec?

client,perforce,specifications
Is there a command to get a specific version of a Perforce client spec, or list all versions of a client spec? It seems to be impossible to do this in the 2009 P4V Windows client. Perhaps it can be done using the p4 command line tool?

How to make server send a message to client on button click

java,client,server
I have a client and a server. When client connects to server the server sends a message to the client. If the user clicks on button "New message" I want the server to send a new message to the client. How can I achieve that? My code (I have removed...

Android app crashing when opening Client Socket

java,android,sockets,client,server
I'm developing an android application that uses Client/Server architecture and i have an error i have a server that i built as a java application, and the client as an android application, my problem is when i click on connect button, the server displays Client Connected that means that the...

Android Messaging app - Client - Server Communication

android,client,message,server,whatsapp
I want to write a private messaging app similar to Whats App. Smartphones with Android OS shall be the clients and communicating with one server. Now my question is how could that work out? I guess the best way would be via a Restful webservice as port forwarding is absolutely...

Threads on client server [java]

java,multithreading,client,server
I'm trying to do multi client server. I already setup server with multithreading. And my question is How Can I join(run) for example 20 clients at one time? I need to use threads aswell? I'm thinking about creating constructor with my client to set connection and get random name and...

Reading input from C socket client to Java socket server

java,c,sockets,client
I have 2 socket clients and 2 socket servers, one of each in C and Java and all running on my local machine as processes. They can all talk to each other successfully except the C socket and Java server. They connect successfully but when I type input into the...

Code design: Observer pattern?

c++,design-patterns,design,client
I am developing the client-server-architecture of a game. The "Client" class communicates with the server and has to interact with other classes depending on the type of information it receives, for instance: If the client class receives map data then it should interact with the class which stores the maps...

c# Devexpress Application won't on Client-PC

c#,devexpress,runtime,client
How do I get an application to run on a client-pc? I finished a small application, which I wanted to start on another computer. But when I click on the click and run-exe file, nothing happens. Do I need additional assemblies on the client-pc?...

How to get HTML code from a website in java program?

java,html,client,client-side
I am trying to get the html code from a website from within my java project. I was able to do this however through some exploring I found out it never loads the client side of the site (not 100% sure what the difference would be), I'm not sure if...

Wait server for 70 seconds

android,multithreading,sockets,tcp,client
I'm new in this forum. I've made a TCP Client in Android with a thread. This code is working for my app: class TCPClient extends Thread { String add; public TCPClient(String IPa) { add=IPa; } public void run() { try { InetAddress serverAddr = InetAddress.getByName(add); socket = new Socket(serverAddr, SERVERPORT);...

Does javascript saves server's electricity?

javascript,client,server-side
I have heard that by putting more and more functionality to client device (via javascript) instead of processing them on server-side and sending to client actually saves the power. Does it true ? Is it that significant to even bother ?

org.springeframework.ws.soap.client.SoapFaultClientException in jBoss 7.1.1

spring,web-services,jboss,client,spring-ws
I'm creating a Spring webapplication (actually a portlet for Liferay), where I have to communicate with a webservice. Our webapplication runs on JBoss 7.1.1. I've done this before without much trouble, the only difference was that in that time the application ran on a Tomcat server. I've tested the webservice...

how to create unkown amount of threads c++

c++,multithreading,client,server
I wrote a server c++ that connect to clients and i want to use thread in order to do some actions and with some clients and not to do only one client finish and go to another client. but i cant create unknown amount of theards only specific. can sombody...

I have a keystore file, how do I provide keyManagers to sslContext in Android app?

java,android,authentication,ssl,client
UPDATE: As for my original question, it turns out that call to java.security.KeyStore.getCertificate(alias) does actually return X509Certiciate. That wasn't the issue though. (Bear with me please, I'm new to this certificate stuff.) I managed to connect to my (self-signed) SSL-enabled server, as long as I don't require authenticated clients. When...

building a whatsapp client for android

android,client,third-party,whatsapp,yowsup
Is it possible to build a whatsapp client for android? I came across the Yowsup project for building a whatsapp client for pc and I wonder if there is something like that for android too. Thanks ahead Edit: Is there any way to build the client with the Yowsup library...

ServerGUI with Save Log - JAVA

java,swing,logging,client,server
So what I have tried to do is a server with a client. Where the server starts a server and the client opens the chat-room where he can write anything he want. So I have 2 problems that I cant get it to work. First problem is that I cant...

multiple send from server to client python

python,file,client,server,sha
First I am sending the requested file from the server to the client and after that I want to send the computed sha of the file from the server to the client, so that the client can check if both the sha from the sent and the received files are...

How to read input from a socket using threads JAVA

java,multithreading,sockets,client,inputstream
I am writing a simple socket programming application that uses a server and one client. I am trying to start a thread (from client file) that reads input from the socket input stream so that i can write messages to the server and read them back and print them to...

How connect to webservice with generated c files from wsdl2c

c,web-services,wsdl,client,stub
I used axis2c to generate c files from a wsdl file. (this is the WSDL file I used) now I have these list of files: adb_helloName.c adb_helloNameResponse.c axis2_extension_mapper.c axis2_stub_HelloService.c plus I have their header files. and a HelloServiceClient.vcproj file. I created a project in visual studio and now I want...

Intent can't move to another activity using IF

android,sockets,if-statement,android-intent,client
I'm having a problem with my program. The process is when the client send a message,the server sends back a message, if the message is "OK", the client will move to the next activity but it didn't. This is my code: OnClickListener SendOnClickListener = new OnClickListener() { public void onClick(View...

Haxe server-client exchange on all platforms

sockets,websocket,client,server,haxe
I'm developing client-server application on haxe. I want client side to be compiled to javascript from haxe, but there is a big chance, that other languages will be also needed. I cannot find universal way of doing it. Though, I can make it with websockets, when it comes to jabascript,...

A simple client/server app [closed]

java,networking,client,server
I'm fairly new to Java coding (and to programming in general) and I'm studying a lot to catch up and having been through a lot of fundamentals (the language, OO concepts, Genrics, Concurrency,Collections etc..)and my future goal being Android programming, I'm trying to get started with networking (simple apps, just...

TCP Client and Servers in C

c,tcp,client,server
I created a TCP client and a server in C and executed it in two terminals. But after changing and compiling the code, I could not get the output. Both server and client keep running and print nothing. Here is my server code /* Sample TCP server */ #include <sys/socket.h>...

Netty IO check if Server closed

java,client,handler,netty,server
how can I check if the Server closed/shut down on the client-side? I want to notice the user when the Server closed. Is there any method to do that?

Shared Collection Between Client and Server Meteor

javascript,mongodb,collections,meteor,client
Beginner at Meteor. Just learning how everything works so bear with me. Everything was working fine in one file, but after installing iron:router to have a multi-page application, I realized that it's better to have separate client and server files. Unfortunately, now I'm having trouble syncing the collection between the...

How to check data in non-blocking sockets client

c,sockets,tcp,client
Client does: connect() select() getsockopt() write() Everything is fine until this moment. But then server requires few seconds to send the status back and I want to receive it without any blocks on waiting. So how should I check that response from server is available? Should it be another connect()...

Is it possible or even allowed to implement QoS on server and client? Live555

client,reporting,rtsp,live555,qos
I have been looking at RTSP of Live555 and seems they are following RTSP as per definition form IETF. So far they seem to have reporting for transmission (data sent) on the server end, and reception (data received ) client end. I am wondering is it possible to implement send/receive...

Spaces with scanf in a client to server message. C

c,client,server,scanf
I'm developing a client/server multithread program in C. I need to send a message from client to server with a scanf but when in the client puts a space the scanf see it as a newline. How can I read an input message with scanf including spaces? (and so the...

'redirect url' for an oAuth2.0 client

android,rest,oauth-2.0,client
I am extremely new to the OAuth framework and am currently working on writing a client on the android platform. When trying to register my application with the api provider, it asks for a redirect url. I searched around bit and found some literature that says that it is a...

How can I redirect a client with python 3?

python,http,redirect,client
I've got my handler setup but after the client requested something via the webbrowser I want the client to be redirected to the default webpage ("/"). I wrote my own http server handler. How can I rederect a client using python 3 to another address? ...

Client side password hash versus plain text

security,hash,passwords,client,password-hash
I'm putting together an android client (and possibly in the future iOS, web portal, etc) and php mysql server. Server side I am currently using the PHPass library to hash and salt the incoming passwords. Should I make the client send plain text passwords over HTTPS/SSL or should the client...

Saving data sent from client to server into a file has invalid characters

c,client-server,client,server,file-transfer
I am trying to send a file containing strings from a client to a server, and then have the server save the results received. So far, I have managed to send the data from the client to the server, but when the server saves the results in a text file,...

Server side not reading message correctly

c#,string,client,server
I'm developing a client-server application, where the client is in Android and the server in C#. Before using C# for the server I used autoIT and it worked fine aside from the fact that I had to send messages of 9 characters or else it would get weird symbols. Now...

TCP Connection using Service

android,service,tcp,connection,client
I have to implement an application. This application communicates with a server using TCP/IP.My application has to request the position to a server.Because the application must stay to listen server request, I think to use an IntentService. So I implement it: public class Tasks extends IntentService{ public final int SERVERPORT...

Why does my XMLHttpRequest not allow XSS?

javascript,xmlhttprequest,client,cors,xss
I am writing a simple app to pull down news stories from the bbc rss feed at http://feeds.bbci.co.uk/news/rss.xml. It needs to run entirely on the client and not make use of jQuery, so JSONP is not a possible solution. I have been testing with IE on localhost and clicking the...

How to insert a newline in a recv in C

c,sockets,client
I write this code to send the list of files contents in a folder from a server for see it in a client. The code works, but I see all files without a newline. How can I see the files with a newline or space? For example, now I see:...

C# socket read buffer error with multiple clients connecting to servers

c#,sockets,client
I write an Windows C# application which can create up to 16 threads. Each thread creates a socket for a remote device. Each thread send commands to read the device status. (every 300 ms) It is OK when I create one or two threads to read the status. But when...

How to debug Jersey 2.x Client Api

java,client,jersey-2.0
I need to see the content of Jerset 2.x Client API post requests before it is sent. I found this: jersey.api.client.WebResource - how to debug/log the request headers But its related to Jersey 1.x Thanks...

C - Write File Contents to a Buffer

c,file,sockets,tcp,client
I'm trying to open a file then send the contents to a TCP server. Currently, I am just opening the file and sending the data to a buffer, which will be accessed by the server. I am unsure of how to do this and also how to keep track of...

JBOSS 7.1.1 server hangs during the compilation of jasper reports

java,jboss,jasper-reports,client,server
My developer server is JBOSS AS 7.1.1 final and I have an app where I make dynamically an jasper report based on some arguments with these basic operations(download, compile, export to pdf, encode to base64, display on screen). The thing is that on my JBOSS it works perfectly, but when...

Return message to Android client from java Server via tcp sockets

java,server,sockets,client,tcp
I am a beginner in Android with intermediate Java programming skills. I am also just learning socket communication. I am trying to make a very simple client/server connection. I have Android app as a client and trying to 1) pass message to Java program on PC and then 2) return...

Having trouble with a simple Twisted chat server

python,client,chat,twisted,server
When I try and run this (see code below) I get the "connection made" response from the server and the command prompt to write an input. However when I try and enter the input it just hangs and the server doesn't seem to receive the message. Anyone know why this...

How to set up windows client to web-based dll

c,windows,dll,client,tcpclient
I have an application that began its life as a C#-based Windows GUI that used marshalling to talk to a C DLL. I now need to separate the Windows client and DLL so that the client is installed on a remote PC and communicates with the C DLL over the...

JAVA : Send an object to the server

java,object,client,server
I am a beginner in JAVA and I try to send an object from my client to my server. The first object from the client works, but when I run an another client, the first object runs an exception to the server : Exception in thread "main" java.io.StreamCorruptedException: invalid stream...

client can't send message from seperate class

android,sockets,tcp,android-studio,client
I created a socket program on android studio. First I create it with on the main class and it is working. With the help of this site I separate the connect and disconnect it works. Now there is a problem when the client send a message on the server. Whenever...

WCF service calls to clients

c#,.net,wcf,service,client
I am trying to create WCF service to handle client requests and modify a database. Beside my user clients i also have other interfaces, which can call my WCF service and modify the database. My problem is, I wish to notify my clients about the database change occured because of...

Send a string from client to server, then save the file [using C]

c,client,http-post,server
I have these two C codes below consisting of a client and a server. The code is simple: 1- Server listens and waits for a connection 2- Client sends a string HTTP Post to Server 3- Server gets the request, posts back a response 4- Client receives response But what...

Simulate a couple of clients calling a single Server class in Java

java,multithreading,concurrency,client,server
I intend to test a Server class to see how it handles concurrent reads and writes using direct calls to the server class, nothing more fancy. I have a Server API that has two functions. int fetch(int key); void push(int key, int value); How do I create multiple clients making...

How to generate client stubs from wsdl over https?

web-services,https,wsdl,client
I am a begginer in web-service world. For my current project i've to use a webservice over HTTPS replacing old HTTP service . What are the commands for generating the client stubs ? What extra parameter are needed for https compare to http ?

Server method to return attribute not working properly Meteor JavaScript

javascript,meteor,client,server
I am trying to call a server method to return whether or not a hidden attribute exists. The attribute returns correctly in the terminal console, but does not return correctly on the client side (returns undefined). The attribute I want to return is tireMarkup. Here is my method call: var...

Java Server - How to take input from InputStreamReader and convert to a String?

java,client,server,dataoutputstream,inputstreamreader
I'm trying to get a very simple Client-Server system to work, where the Client will send a String over to the Server, and the server will then store that String into a file. The client sends the string through: //Other Code sockStrm = new DataOutputStream (clientSocket.getOutputStream ()); //Other code sockStrm.writeChars...

Common.Logging.NLog32 unable to use NLog 3.2.1.0? On client only?

c#,wpf,client,nlog,common.logging
I'm currently setting up a client server project. My server part is a C# WebAPI project (net45). My client part is a C# WPF project (net45). For logging I want to use Common.Logging with the Common.Logging.NLog32 adapter. At first I configured it in the server part and it worked like...

Python Networking

python,networking,client,server
So I have create a socket and am using the function socket.bind() and keep on getting the following error: Only one usage of each socket address (protocol/network address/port) is normally permitted Here is my code: import socket s = socket.socket() host = socket.gethostname() port = 12345 s.bind((host, port)) s.listen(5) while...

Python client write to Java's writeUTF method

java,python,sockets,client,server
I have the following code snippet for a Java server that can't be changed: .... while(true){ try { System.out.println("Will listen . . ."); instruction = this.dis.readUTF(); // Socket's dataInputStream System.out.println("Got instruction: " + instruction); } catch (IOException ex) { Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex); } .... } // end while(true) And I...

Hide basic auth credentials in Javascript client

javascript,api,security,client,basic-authentication
I need to make from my client side javascript code an ajax request posting some data to the backend with jQuery. $.ajax({...}); The Javascript code can be embedded by various client so I enabled CORS on my backend and the requests go fine. The backend is protected by an Basic...

Is it possible to change the Twilio Browser Client ringtone?

browser,client,twilio,ringtone
I did not find it in Twilio documentation that I can change it. Does anyone has a solution to this problem? Perhaps it is possible to replace the mp3 file that is downloaded to the browser and used as a ringtone. I need this, because my clients are somewhat annoyed...

Transferring files over a network: Send from client or from server?

sockets,client,server,file-transfer
I am presently working on a client-server solution to transfer files to another machine via a socket network connection. I am fairly new to the whole client-server thing and therefore have the following - admittedly very basic - question: For the file transfer, does it make any difference if I...

ServiceStack user session not found when using sessionId in client Headers or Cookies

client,servicestack,session-cookies
I am using ServiceStack v4 with custom Authentication. This is setup and working correctly. I can call the /auth service and get a returned AuthorizationResponse with unique SessionId. I also have swagger-ui plugin setup. Using it, I can authenticate via /auth and then call one of my other services which...

Java Client/Server App will not readLine()

java,client-server,client,server
I am trying to write a program that allows the user to send a message to a server and receive a modified version of that message. For some reason, the flow of the program stops on a certain line below, which I have pointed out. Can anybody explain why this...

Java socket BufferedReader reads all inputs from loop at once

java,swing,sockets,client,server
I have simple server-client application. There is an option, which client can send to the server, to read generated data. void getManyFromServer(int numberOfGets){ try{ for(int i=0;i<numberOfGets;i++){ fromServer = sockIn.readLine(); fromServer+="\n"; textArea.append(fromServer); } } catch(IOException exc){ /*...*/ } } As you can see, I want to read data 10 times, because...

Show contents of a folder server to client C [closed]

c,file,client,server
How can I send the names of files contents in a folder from a server to a client? I would that in a client I could see the list of files contents in a folder receive from a server. Thank you very much!...

I receive (null) when I send a char * with sockets in C

c,sockets,client,server
I am implementing a server/client arquitecture and I can send different petitions and receive it with no problem (using a struct of message) the problem becomes when I want to send a single (char *) when I print the received (char *) it prints (null) Here it is the client:...

CORS, Client vs. Server & Rails API GET Request

ruby-on-rails,ruby,api,curl,client
I've built a GET Rails API that checks for an access token and that the registered request.env["HTTP_X_REAL_IP"] matches the IP address that is registered within the admin panel of the app. Example request: https://staging.mysite.com/api/v1/products?access_token=7b9f3cddd3914a6f45fa692997fe6dc9 The API works great when I'm making requests from a server by curling the request or...

ofstream not outputting when I don't have a endl c++

c++,sockets,client,server
I have a client/server socket program that writes packets of file data in a char[2048], I've made 100% sure to null terminate all of the arrays before sending over the socket. However on the server side I can't get the ofstream to output to the file if I do not...

multiple clients cannot listen and write at the same time

python,network-programming,client-server,client
I'm writing a very basic chat room in python. Clients connect and any message from a client is relayed to all clients. The problem I'm having is getting the client to listen and send messages at the same time. It seems to only do either one. I've set up a...

MySQL connect to google app engine instance

mysql,sql,google-app-engine,client
I have a google app engine application and Cloud SQL set up, I have attached the application to the instance but now I have to connect my computer (MAC OS X) using MySQL client (the terminal) to the instance. According to the GAE tutorial: shell> mysql --host=instance-IP --user=user-name --password Enter...

Client server on external ip's and different networks android

android,client,server
I wrote a client server application that works only on the same network. Is it possible for a client implemented using sockets to connect to a server's external ip (also implemented using sockets..) and/or on different networks? I used to think its possible, but Its just not working... I'm telling...

TCP Client don't work on Android

java,android,sockets,client
I make a client in Java, and make some test on Eclipse IDE and work perfectly, on localhost, external server, etc. When I export the code to android, it doesn't work, the server don't receive nothing ... Class code: import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import...