Re: Messaging alert



Ulrich Schöbel wrote:
Am Wed, 08 Mar 2006 09:38:45 -0500 schrieb Fernando Quinones:

Can anybody help with the trouble?

You probably stopped reading my previous posting too early.
The only message I have from you is dated 2/24, is that the one your are talking about?

Cameron, I did not went too far. Short of a binary I wont be able to install anything in my local machine. I can decompress folders but I cant compile anything as would on my late unix box. What you have in mind? Here is the original post:

Post 1

I want a user to automatically notify me when he needs me to look at a text file that he has created and I want to notify the user back once I have seen and “processed” the file.

He uses a script that I have built to create the file and once he “sends” the file I should get a notification by a mean of a tk_message or just flashing a message on my end of the application. I was hopping that I could use sockets to create a connection back and forth in order to send the message.

Fernando
==> end of post1


Post 2

So far I have been able to create a socket and launch a tk_messageBox. However, this will happen with any connection. I want to be able to send a file name and other information thru the client socket to then process in the servers. Did I mention I want to have about 2 to 3 servers listening? These is what I have from the book.

############
# server
############


set listenSocket [socket -server Accept2 4512]

proc Accept2 {newSock addr port} {
global forever listenSocket

set choice [tk_messageBox -type yesno\
-icon info -title success\
-message "socket success, Stop server?"]

if {$choice == yes} {close $listenSocket}

}

vwait forever


############
# client
############



proc Socket_Client {host port timeout} {
global connected
after $timeout {set connected timeout}
set sock [socket -async $host $port]
fileevent $sock w {set connected ok}
vwait connected
if {$connected == "timeout"} {
return -code error timeout
} else {
return $sock
}
}


Socket_Client host_ip_address 4512 3500

If I got this straight at the client side, the socket is created and saved to sock. The fileevent statement set connected to ok when sock becomes writable. When connected changes value vwait stops waiting and the if statement returns the value of sock.

At the server side I am listening at the port and execute Accept2 when the socket is created. In the original proc the values of newsock addr and port where printed. However, I miss how do the newsock(the socket number) and host address are coming from.

The important question now is how do I send the information from the client to the server, lets say something like a filename. Where do I pack that information. Moreover, once I get that information on the server how do I send a message back to the client that I am done with processing the file.

I have more questions, but I need to understand this first. Thanks for all your help.

==> end of post2

I guess I am not getting how can I send the string of data with the information I want to be procesed at the server and how to have the server reply back at due time with a "ok im done" message.

Fernando
.



Relevant Pages

  • Re: Socket Exception
    ... In this case the server most likely rejected your ... connection. ... Each command is a new socket connection that is opened and closed ... /// Required designer variable. ...
    (microsoft.public.win32.programmer.networks)
  • Re: ASP.NET 2.0 - a newbie question
    ... Is there some experienced ASP.NET 2.0 developer, ... server that comes bundled Microsoft VWDE. ... A connection attempt failed because the ... connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& ...
    (microsoft.public.dotnet.framework.aspnet)
  • error when move web service from dev machine to test server
    ... I have a simple web service that I developed on my laptop that resides ... test server, & when I try to run it, I get the error "No connection could be ... No connection could be made because the target machine actively refused it ... Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Socket Exception
    ... In this case the server most likely rejected your ... connection. ... Each command is a new socket connection that is opened and closed ...
    (microsoft.public.win32.programmer.networks)
  • Re: Strange server socket behaviour
    ... asynchronous server socket: ... I already have a perfectly working server that uses asynchronous sockets ... Why should the remote client close the connection? ... when a .NET client connects. ...
    (microsoft.public.dotnet.framework)