Search found 25 matches: onread

Return to advanced search

Re: Sockets write & read question

... then oSocket:bAccept = { | oSocket | oClient := TSocket():Accept( oSocket:nSocket ),; oClient:Cargo := ST_COMMAND,; oClient:bRead := { | oSocket | OnRead( oSocket ) },; oClient:bClose := { | oSocket | OnClose( oSocket ) } } oSocket:Listen() But I was maybe thinking that oSocket:SendData could return ...
by Marc Vanzegbroeck
Mon Jun 16, 2014 8:25 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Sockets write & read question
Replies: 3
Views: 586

Re: Socket and Web server Not Working

... BUT i dont have any other problems. Nothing is crashing. Network on the ce device still works. Ip address renew works. It just wont accept another onRead event. Am i right in assuming 2 sockets are used. The first one is created and listens for a request. When one arrives another socket is created ...
by johnshay
Wed Sep 26, 2012 11:14 am
 
Forum: FiveWin for Pocket PC
Topic: Socket and Web server Not Working
Replies: 8
Views: 4816

Re: Problem with oSocket:bRead

Can I use oSocket:OnRead instead of oSocket:bRead ?

Regards,
Dutch
by dutch
Wed Apr 14, 2010 11:23 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Problem with oSocket:bRead
Replies: 1
Views: 350

Re: Big problem : oSocket:OnRead and oSocket:bRead ?

Dutch, Imagine this example: 1) I tell you to go somewhere and get an envelope for me. 2) You go there, get the envelope and return it to me. 3) Again I ask you to go for a new envelope. etc A common error is: 1) I tell you to go somewhere and get an envelope for me. 2) You go and get the envelope, ...
by Antonio Linares
Wed Dec 02, 2009 1:49 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Big problem : oSocket:OnRead and oSocket:bRead ?
Replies: 4
Views: 807

Re: Big problem : oSocket:OnRead and oSocket:bRead ?

Dutch,

You should only read data when Windows tell you so, and it tells it to you invoking bRead.

So you should not wait for new data inside OnRead. That is a common mistake because this process is not properly understood.
by Antonio Linares
Wed Dec 02, 2009 1:45 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Big problem : oSocket:OnRead and oSocket:bRead ?
Replies: 4
Views: 807

Re: Big problem : oSocket:OnRead and oSocket:bRead ?

... data, We will use ::bRead routine. ?? case 2. when expected data, (after we send request *inquiry*) and it will send data back. We will use ::OnRead() ?? case 3. on 2nd case expected data will run to :bRead also? Regards, Dutch PS. In the past, this program run via RS232 (Com port).
by dutch
Wed Dec 02, 2009 11:46 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Big problem : oSocket:OnRead and oSocket:bRead ?
Replies: 4
Views: 807

Re: Big problem : oSocket:OnRead and oSocket:bRead ?

Dutch,

bRead is evaluated when new data arrives, then OnRead() reads the arrived data.

So the sequence is:

Event (new data arrives) --> We proceed to read the arrived data --> once all expected data has arrived then you may send an acknowledge
by Antonio Linares
Wed Dec 02, 2009 8:48 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Big problem : oSocket:OnRead and oSocket:bRead ?
Replies: 4
Views: 807

Big problem : oSocket:OnRead and oSocket:bRead ?

... data but the protocol have to receive data and send ack. The problem is I don't which one will get the data (between oSocket:bRead or oSocket:OnRead())? *--------------------*function Client()   oSocket := TSocket():New( nPort )   oSocket:bRead    = { | oSocket ...
by dutch
Wed Dec 02, 2009 4:05 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Big problem : oSocket:OnRead and oSocket:bRead ?
Replies: 4
Views: 807

Re: Is it possible to read and send mails from Exchange Server?

... CLASS TPop3 DATA   lHeaderOnly   // New Data METHOD New()   ::lHeaderOnly:=.F.  // Initialize the Value to .F. In METHOD OnRead() Line 147          if ::lHeaderOnly                    cCommand ...
by anserkk
Fri Nov 20, 2009 7:50 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Is it possible to read and send mails from Exchange Server?
Replies: 15
Views: 3589

Re: Testsmtp.prg FWH9.03

I made another modification to method OnRead() - Lines 341-345 - so that the attachments are displayed with the proper case and the path is not shown in the mail (some clients did show it cause the full "name=")                     ...
by Davide
Fri Apr 10, 2009 11:23 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Testsmtp.prg FWH9.03
Replies: 9
Views: 1580

Rick;

I feel the same way. But sometimes you just have to. And when you do, I always try to subclass.

CLASS eMAIL FROM TSMTP
....

In this case I replaced the OnRead Method to include all the other flags.


Reinaldo.
by reinaldocrespo
Mon Oct 06, 2008 1:11 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Trapping SMTP e-mail error
Replies: 43
Views: 7634

... ) oSocket:bAccept = { | oSocket | oClient := TSocket():Accept( oSocket:nSocket ),; oClient:Cargo := ST_COMMAND,; oClient:bRead := { | oSocket | OnRead( oSocket ) },; oClient:bClose := { | oSocket | OnClose( oSocket ) } } oSocket:Listen() return nil //------------------------------------------------------------------------// ...
by MGA
Mon Sep 22, 2008 8:19 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Sr. Antonio ajuda com SOCKET´s!
Replies: 14
Views: 2703

Error con array en tsmtp

... = C < [ 2] = A { ... } Stack Calls =========== Called from: => AT(0) Called from: => CLEANEMAIL(659) Called from: tsmtp.prg => TSMTP:ONREAD(270) Called from: tsmtp.prg => (b)TSMTP:NEW(131) Called from: tsocket.prg => (b)TSOCKET:TSOCKET(77) Called from: tsocket.prg => TSOCKET:ONREAD(0) ...
by JoseLuis
Thu Sep 11, 2008 10:36 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Error con array en tsmtp
Replies: 3
Views: 760

Tim OK .. I see the OnRead method and I see where to plug in the code .. I will attempt to patch the 8.07 tsmtp and add the TempFile() static function and let everyone know if it works .. Many thanks .. if this works I can re-start ...
by Rick Lipkin
Fri Aug 01, 2008 11:19 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Tsntp ( attachments )
Replies: 14
Views: 3085

SMTP

I'm using the SMTP extension to the FWH class. Louis provided this extension a number of years ago. In the OnRead( ) method, at least in my version, there is an oSocket:SendData( ) operation for including attachments. Here is the code snippet: For nI := 1 To Len( ::aFiles ) ...
by TimStone
Fri Aug 01, 2008 11:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Tsntp ( attachments )
Replies: 14
Views: 3085
Next

Return to advanced search