I am developing one program in which a user can download a number of files. Now first I am sending the list of files to the user. So from the list user selects one file at a time and provides path where to store that file. In turn it also gives the server the path of file where does it exist.
I am following this approach because I want to give…
I'm running a rails app in development with postgresql 9.3. When I tried to start passenger server today, I got:
PG::ConnectionBad - could not connect to server: Connection refused
Is the server running on host "localhost" (217.74.65.145) and accepting
TCP/IP connections on port 5432?
No big deal I thought, that happened before.…
Hi,
I'm trying to write an app that associates a particular USB string descriptor (of a USB mass storage device) with its volume or bsd name.
So the code goes through all the connected USB devices, gets the string descriptors and extracts information from one of them. I would like to get the volume name of those USB devices. I can't…
I try to play with sockets a bit. For that I wrote very simple "client" and "server" applications.
Client:
import java.net.*;
public class client {
public static void main(String[] args) throws Exception {
InetAddress localhost = InetAddress.getLocalHost();
System.out.println("before");
Socket clientSideSocket =…
I have an urgent project which need many functions of a calculator (plus a few in-house business rule formulas). As I won't have time to re-invent the wheel so I am looking for source code directly.
Requirements:
BSD licensed (GPL won't help)
in c/c++ programming language
32-bit CPU
minimum dependency on platform API/data…
We have 2 identical database tables on our dev server. In both is a table that holds an X509Certificate2 data in one of its fields.
When I grab the cert along with the password that I've been using all along, it works over the first database just fine. I run the same code though over the 2nd database and get this error and…
Just a quick question about using select().
I'm using select() to read from multiple sockets. When I looked up examples on how to use select(), a lot of tutorials showed going through for loops and checking for FD_ISSET. The problem I have with those tutorials is that the for loop starts from i = 0. and checks if the bit…
Hi,
I'm very interested in learning about the new feature in html5 called web sockets. I've looked into it and have come out with a few questions.
It seems that before I can start implementing this new technology into a web application of mine I need to have a web server which supports it. Does this involve downloading…
Hi,
I was just wondering about the functions fopen, fclose, socket and closesocket. When calling fopen or opening a socket, what exactly is happening (especially memory wise)?
Can opening files/sockets without closing them cause memory leaks?
And third, how are sockets created and what do they look like memory wise?…
I have built two programs in C# and I am sending simple strings through the sockets. This is fine for the moment but in the near future I will need to send more complicated items, such as objects down the sockets and eventually files.
What steps would I take to do this? What purpose do the buffers serve for the…
when i try to login in apache i get #2002 error. when i try to login via terminal it ask my password mysql -u root
and i get
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
i tried to remove mysql and install it again and nothing happen ( i cant even…
Thanks to everyone who attended my sessions at DevConnections Las Vegas. I had a great time meeting new people, discussing business problems and solutions and interacting. Here’s the code and slides for the sessions. For those that came to the full-day Silverlight workshop I’ve included the slides that…
I'm looking for info on creating a remote management interface for our software. This is not anything illicit. Our software is for live TV production and once they go on-air we can't access the PC (usually through LogMeIn).
I would like to be able to upload/download files and issue commands to our…
I have a somewhat simple, but specific, question about implementing the transport layer for a SIP UAC.
Do I expect the response to a request on the same socket that I sent the request on, or do I let the UDP or TCP listener pick up the response and then route it to the correct transaction from…
I am trying to write a Java application that works similar to MapReduce. There is a server and several workers. Workers may come and go as they please and the membership to the group has a soft-state. To become a part of the group, the worker must send a UDP datagram to the server, but to…
I would like to display some events in 'real-time'. However, I must fetch the data from another source. I can request the last X minutes, though the source is updated approximately every 5 minutes. This means that there will be a delay between the most recent data retrieved and the point…
Ok so I'm musing over a little side project I want to start. Essentially its a multi-session web based FTP client. Multi-session in that you can log into several FTP servers at the same time and perform operations like moving a file from one FTP server to another.
I'm doing this mainly…
I have developed a solution where a Java applet makes a socket connection to a port on a socket server (which happens to run on a web server).
But a new client has implemented https within their LAN and so I am told communication must be via HTTPS.
With standard socket communication…
When is it best to use Iterators in PHP, and how can they be implemented to best avoid loading all objects into memory simultaneously?
Do any constructs exist in PHP so that we can queue up results of an operation for use with an Iterator, while again avoiding loading all objects into…
I've recently read three separate books on algorithms and data structures, tcp/ip socket programming, and programming with memory. The book about memory briefly discussed the topic of serializing data structures for the purposes of storing it to disk, or sending it across a network. I…
I have a task that involves talking to a .NET-based API (namely AutoCAD) to retrieve data, send commands, and react to events.
I want to separate the API operations and the proper program logic (largely already implemented in Python) by using natural tools for both: a C# DLL for the…
Could someone please explain quite clearly the difference between a port and a socket. I know that a port serves as a door into the network for an application
process and that the application process uses a socket connection to the given port number to handle network communication…
I plan to make a set of classic socket functions to simplify their usages.
Since i work under windows and linux indifferently i usually make it portable (it's not my first version of this set of functions), but i want to do something different this time and dedicate one version to…
This is the client and server program where a client sends a file to server to save in the server. There is a issuse in that same file name is not getting copied on the server with same file size
Please help me in this
Client program
import socket
import sys
s =…