PHP Classes

Server and Client

Recommend this page to a friend!

      Socket Server  >  All threads  >  Server and Client  >  (Un) Subscribe thread alerts  
Subject:Server and Client
Summary:Server with client
Messages:1
Author:Dennis
Date:2011-01-06 20:20:08
 

  1. Server and Client   Reply   Report abuse  
Picture of Dennis Dennis - 2011-01-06 20:20:16
hello,

I'm trying to implement a server/client socket im new to sockets ill try to explain my situation i saw your class and try to implement what i need but i need your help since im new to using socket connections.

I have a running TCP server on a board that controls various relays.
It can only accept 1 connection and it only talks back to 1 IP address (the client that connects to it) on the same port.

I need to create a connection as a client to that board so i can listen for messages (from incoming sensors on the board) but also need to send messages to that board from different webpages (php's) on my server, that operators access through the web server.

I try to use your class and add a socket_connect() but cant get it to work.

My idea is to have only one connection to the server as a client and share that connection (which i think is not possible) or use your server as a catch in request from my web pages and relay that information through the client that is already connected.

Is it possible to do this?