About Store Forum Documentation Contact



Post Reply 
question about "FastConnection"
Author Message
Babulesnik Offline
Member

Post: #1
question about "FastConnection"
How to read a "File" using the FastConnection.

PHP Code:
FastConnection FastConnect;
Str ReceiveStr;
Byte data[65536];

...

    
// send
    
if(Kb.bp(KB_SPACE))
    {
        
File f;f.writeMem().putByte(7).pos(0);
        
SockAddr addr;

        
addr.fromText(S+"127.0.0.1:"+TextPort()() );

        
FastConnect.send(addr,f);
    }

    if(
FastConnect.receive(addr,data)!=-1)
    {
        
File f;

                      
How to use a buffer data[] ???

        
//f.get(data,SIZE(data));
        
ReceiveStr f.getByte();
    } 

How to receive the combined statement in the File ?

for example:

PHP Code:
    // send
    
if(Kb.bp(KB_SPACE))
    {
        
File f;f.writeMem().putByte(COMMAND).putStr("StrData").pos(0);
                     .....
        
FastConnect.send(addr,f);
    } 
(This post was last modified: 10-12-2011 09:10 PM by Babulesnik.)
10-12-2011 09:03 PM
Find all posts by this user Quote this message in a reply
Post Reply