C# :: Server Application Using Tcp Protocol And Then Establish Connection With A Client Application

Nov 29, 2014

What happens if I make a server application using tcp protocol and then establish connection with a client application but the server crash and then the client send data. Will the data be lost or the system will continue trying to send it?

View 2 Replies


ADVERTISEMENT

Visual C++ :: MDI Application Client Window

Apr 17, 2015

I am developing a MDI application that will contain a RibbonBar and a Properties Pane window. The MDI documents are not tabbed. I am finding that when I try to move the client window around, it gets clipped by the RibbonBar and the Properties Pane window (shown in image). I know the client window cannot go outside the client area, but can the client window be on top of the ribbon bar and the properties pane window?

I am using VStudio 2008.

View 7 Replies View Related

C++ :: Server Application - How To Delete Calls To New

Mar 29, 2012

I created a server application but i need to know how to delete my calls to new

Code:
CBaseServer::CBaseServer() {
}
CBaseServer::~CBaseServer() {
}
void CBaseServer::Start() {
struct sockaddr_in ain;

[Code] .....

Also when I call this..

Code:
new CThreadManager();

It gives me this warning...

warning C4345: behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized

View 10 Replies View Related

C/C++ :: Application Which Reads Input From Server And Write To A File

May 6, 2014

Currently I'm working on a application which reads the input from the server and write to a file. Message stored in server : idle_message="维杰PC时钟" key_prompt="在按键"

Server will send a xml reply with encode type as "UTF-8". In my code I'm store in a char array. [ char * ch = "idle_message="缁存澃PC鏃堕挓" key_prompt="鍦ㄦ寜閿" msg came from server and copied from vs2005 watch point] After this I'm writing the same to a file in my desk using the API WriteFile. When i open the file in Editplus below is the content.

idle_message="维杰PC时钟" key_prompt="在按键" Again I'm trying to read the file and storing into the char array. Below is the content viewed by the watchpoint in VS2005.

idle_message="缁存澃PC鏃堕挓" key_prompt="鍦ㄦ寜閿? I'm trying to find the starting and ending chinese char and I'm converting that char to wchar_t using the API mcstowcs() for display, its coming as completely junk chars.

I can able to every place the chinese char are different. how to overcome this problem.

View 6 Replies View Related

C# :: How To Start Application And Automatically Pass Input To That Application

May 9, 2012

I want to create an application that starts an application and passes input to that application. I know how to start a process using the classes in System.Diagnostics, but I don't know how to pass data to the process.

For example, and this is just an example, I would like to be able to automatically start an application that requires a username and password and automatically enter the username and password. Of course, that might open the door to security vulnerabilities, but that's not the point of the exercise.

How to implement the functionality I described? Is there a general way to go about doing this or does it depend entirely on the idiosyncrasies of the application in question?

View 2 Replies View Related

C Sharp :: Run Application When Log Off In Console Application

Oct 4, 2012

i have task scheduling application which execute every 30 minute i want to keep this process when system is log off in c# console application

View 2 Replies View Related

C Sharp :: Could Not Open Connection To SQL Server

Feb 19, 2013

I'm getting this error.

SQLite error
near "16": syntax error

On the code:

private void btnUpdate_Click(object sender, EventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{

[Code]....

With breapoints etc it does show the values it has to insert into my database. But it just doesn't and gives me the Near "16" syntax error.

View 50 Replies View Related

C Sharp :: SQL Server Connection String To Connect Through Domain Name (internet)

Sep 20, 2012

I have tried to connect my sql server 2005 using a domain name. i have bought a domain name and a dns client. this is my connection string

{ SqlConnection sqlconn = 
 new SqlConnection("user id=user1;" + "password=pass2;"
  + "server=www.mysite.infoServerInstance;" 
+ "trusted_Connection=false;" + "network 
library=DBMSSOCN;" + "Integrated security=false;" 
+ "initial catalog=Mydatabase;" +"connection timeout=5
;"); }

I have added sql browser & sql server in fire wall, and also enabled tcp port 1433 and udp port 1434. the above connection string works perfect when i run it in the server machine, but whenIi try to run it on other machines I am getting an error that server is not available or cannot find the specified server.. I desperately need to access my database through an url. ie., through internet..

View 6 Replies View Related

C++ :: Connecting Client And Server App

May 30, 2013

I need to create a client and server program. The client will have a GUI that will display all the available servers (since more than one will be running) in a list box.

I’m guessing a TCP connection will be the best method here, but how will the client find the servers to connect to? I won’t know the IP address of the server because anyone could take the server program and run it on their computer and the client would have to find it.

Is there some way to make the server send some kind of signal that only the client application will be to connect to? So the server will be sending out a signal, the client finds the signal and connects to the server. Is this possible?

i also need to be able to store the IP address the client selects so when the client application is run again it will automatically connect to the server that was stored.

View 19 Replies View Related

C++ :: Multithreaded Server And Client

Apr 28, 2014

I need the code for multithreaded server and client code. one server and two or more client connect to server.

Without fork(),semaphore(),etc

View 1 Replies View Related

C :: Client Not Receiving Time From Server

Sep 2, 2013

I'm building a client server which is communicating.I am trying to use the function recvfrom, but have several bugs, so I might have the recvfrom function in the wrong part of my code.

Code:

int talk_with_server(int fd) {
printf("Test.
");
char buf[LEN];
int n = read(fd, buf, LEN);

[Code]....

View 1 Replies View Related

C :: Server-client File Transfer Using UDP

Sep 1, 2013

I have to make a server-client file transfer using UDP . I have created a basic server which receives message sent by client . That's all. Now comes the major part :-

1. The message sent by client is the name of file
.2. Now the server checks whether there exists this file or not .
3. If there exists it sends the file to the client and it also keeps the count of the number of requests of file made by the client . Here is the Server Code

Code:

#include<sys/socket.h>
#include<arpa/inet.h>
#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>
#include<sys/types.h>
#include<string.h>
}

[code]...

The server reads the data from file and writes into it and send to the client , On the other end client receive the data and make duplicate of this file and write into it. But on compiling it gives error in reading the file.

View 4 Replies View Related

C/C++ :: Send Message From Server To All Client?

May 30, 2014

First of all i create single server single client program and then using thread i make multiple client to connect to server.

while(true){
csock = (int*)malloc(sizeof(int));
if(nClient<=maxClient){
if((*csock = accept( hsock, (SOCKADDR*)&sadr, &addr_size))!= INVALID_SOCKET ){

[Code].....

The clients send message to the server and server echo back the message to that particular client. But i want that the server will echo back ones's message to all clients. Suppose 5 clients are connected to the server. So whenever one client send a message to the server, the server will send that message to all 5 clients.

View 1 Replies View Related

C# :: Stream Video From LAN Server Onto Client PC?

Oct 9, 2014

I have loads of movies on DVD and they are all on my media server, but the media server doesn't actually allow streaming to be done, the movies are just stored in a folder on the desktop.

My goal would be able to host all my movies on my LAN server, then build an application to run on a windows based PC at home, not over the Internet just over LAN. For example, say the server I have at home had all the movies in a folder on the desktop, then when I start the client on another PC or laptop in my house, I could view all the movies, choose which one and then stream it to that client PC. I am using C#.NET WPF visual studio.

Maybe I could use something like VLC player to play the movies but I would want to build an client application to view the movies and search for them on the server where the movies are stored. Also I know there are other media streaming programs out there but I want to develop my own one for my uses.

View 8 Replies View Related

C# :: Cannot Send Data From Client To Server

Oct 26, 2014

i am making a client server application but the problem is that i cannot send data from CLIENT to SERVER , but i can receive data from SERVER to CLIENT ... Below is mt client and Server code and i also have attached both client and server files...

CLIENT CODE:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
namespace asynclient {

[code]....

View 3 Replies View Related

C++ :: Client Server Programming Using TTcpServer?

Jun 23, 2013

I am using the following code that I copied from a website to send some numbers using TTcpServer in C++.

void __fastcall TForm2::Button1Click(TObject *Sender) {
//Creating a stream
std::auto_ptr<TMemoryStream> myStream(new TMemoryStream);
for (byte i = 0; i < 9; i++) {
myStream->WriteBuffer(&i,1);

[code]....

I do not understand what is being sent in the byte variable, nor why a byte variable was used. I want to send some strings instead of numbers, but I don't understand what's taking place so I can't identify what to change.

View 2 Replies View Related

C/C++ :: Send JPG File From Client To Server?

Feb 27, 2013

Share ur code wit my. m working on windows n using visual studio 2008..

View 1 Replies View Related

C :: Sending Variable From Server To Client Program (with Ack)

Feb 23, 2015

ok to start, windows based program, using pelles c ide

winsock2, using "sample" codes, able to connect, BUT no clue what 1/2 of the codes do, and most of the coding is for nix based systems!

trying to understand, and implement a minimal amount of code to add to a current menu based program!

being able to open connection, wait for input from server, receive input, acknowledge the input, then "act" then return to waiting for new input.

or vice versa, server waiting on client (but then server would have to send all the current status`s to client, so that client could be in real time, prob by sending an array from server to client).

View 11 Replies View Related

C++ :: Enet - How To Make Server And Client For A Game

Feb 1, 2014

So I've just been messing with enet trying to figure out how to make a server and client for a game. I'm having problems whenever the server receives something from a client. For now I'm just trying to send it to all the clients for them to draw the other player, but for some reason whenever I try to an error message comes up saying a breakpoint has been triggered. I don't know why it is happening. This is the code that is giving me problems.

for (unsigned int i = 0; i < peers.size(); i++)
enet_peer_send(peers[0], 0, event.packet);

View 2 Replies View Related

C++ :: Client Sends A Request To Server And Get Some Data

Apr 28, 2014

I want to write a little c++ program that sends a request to a server an get some data. I found the C++ Rest-SDK and decided to use it. I searched on different websites for code-examples but many of them doesn't work an shows syntax errors. What i got now is that code but the client.request method is skipped. The program never jumps in.

#include <Windows.h>
#include <iostream>
#include <sstream>
#include <string>
#include "cpprest/containerstream.h"
#include "cpprest/filestream.h"

[Code] .....

View 1 Replies View Related

C++ :: Insert One Key With Three Values In Map With Client Server Program

Dec 4, 2013

I completed the program but how insert three values without using struct???

Server Program

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <iostream>
#include <netdb.h>
#include <errno.h>
#include<map>

[Code] .....

View 8 Replies View Related

C/C++ :: Trying To Get Server To Send Contents Of Txt File To A Client

Mar 2, 2015

Here is what I got so far, I am not able to send whats in the txt file to the server. Its pretty much a txt file with movie names and when the client types the name, it brings up the movie and its ranking (all from the txt file)

Server Code::

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <string.h>
#include <fcntl.h> //file control

[Code] .....

I attached the images of the client and server when I run this, along with the movie.txt file. I cannot seem to get the file to send to the client?

Attached image(s)

View 9 Replies View Related

C/C++ :: Send Contents Of TXT File From Server To Client

Mar 2, 2015

I am not able to send whats in the txt file to the server. Its pretty much a txt file with movie names and when the client types the name, it brings up the movie and its ranking (all from the txt file) .....

Server Code::

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

[code]....

I attached the images of the client and server when I run this, alongside the movie.txt file. I cannot seem to get the file to send to the client

View 1 Replies View Related

C++ :: Free Up Memory In Client Server Program

Nov 22, 2013

How to free the memory and address,value

Server:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>

[Code] .....

Client:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>

[Code] .....

View 1 Replies View Related

C :: Netstat And PS Commands For Client / Server Socket Programming

Mar 3, 2013

I made client server program with fork ,without using signal handler because I want to see the status zombie for parent server, but when i execute "ps" command i didn't see anything for server or client pid or ppid ,i wonder about how to show the server and client process coz when i execute commad "ps" i saw only ps and bash processes???

View 1 Replies View Related

C++ :: Image Transfer Between Linux Server And Windows Client

Jun 27, 2014

how send and receive images from linux server to windows client?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved