bartbes / love-misc-libs

Just some random libs I have lying around, now with version control!
http://docs.bartbes.com
110 stars 28 forks source link

LUBE-Testing how to create a client? #6

Closed ghost closed 13 years ago

ghost commented 13 years ago
   self.conf = {
        ip = '100.100.100.100',
        port = 2842, 
        handshake = 'dev',
        ping = true,
        pingtime = 4,
        pingmsg = 'ping',
        }
    self.client = lube.tcpClient()
    self.client.handshake = self.conf.handshake
    self.client.callbacks.recv = function(rawData, clientid) self:onReceive(rawData, clientid) end
    self.client:setPing(self.conf.ping, self.conf.pingtime, self.conf.pingmsg)
    self.client:connect(self.conf.ip, self.conf.port)

is this example correct to create a simple client?

bartbes commented 13 years ago

I'd say it is.. why is this an issue?

ghost commented 13 years ago

oops .. sorry ... the error what I get is:

"Can't use a generic client object directly, please provide an implementation."

but I create an instance from lube.tcpClient()