https://linen.dev logo
Join DiscordCommunities
Powered by
# openfl
  • t

    thousands-state-46635

    08/23/2022, 9:57 PM
    can you send the code block?
  • a

    ambitious-knife-25690

    08/23/2022, 9:58 PM
    a quick google lead me to the openfl socket api
  • c

    curved-king-43987

    08/23/2022, 9:58 PM
    Yea
  • a

    ambitious-knife-25690

    08/23/2022, 9:58 PM
    when you get an eof error this is what it represents
  • b

    best-oil-63421

    08/23/2022, 9:58 PM
    i'm not reading, though
  • b

    best-oil-63421

    08/23/2022, 9:58 PM
    i'm writing
  • c

    curved-king-43987

    08/23/2022, 9:58 PM
    Which confused me cause I was sure that would be the issue
  • c

    curved-king-43987

    08/23/2022, 9:59 PM
    As in, perhaps it's trying to read nothing instead of writing something
  • h

    hallowed-ocean-84954

    08/23/2022, 9:59 PM
    so what does client.send() actually do ?
  • c

    curved-king-43987

    08/23/2022, 9:59 PM
    Trying to figure that out
  • a

    ambitious-knife-25690

    08/23/2022, 9:59 PM
    nah, unlikely
  • a

    ambitious-knife-25690

    08/23/2022, 9:59 PM
    try commenting out your send and see if the issue happens
  • b

    best-oil-63421

    08/23/2022, 9:59 PM
    i don't have it anymore, someone changed it
  • t

    thousands-state-46635

    08/23/2022, 10:00 PM
    how are you testing the game then?
  • b

    best-oil-63421

    08/23/2022, 10:00 PM
    i wasn't, i was going to now, but all the old code is gone
  • c

    curved-king-43987

    08/23/2022, 10:00 PM
    Found it
  • c

    curved-king-43987

    08/23/2022, 10:01 PM
    Copy code
    haxe
    public function send(event:String, ?data:Dynamic){
            if (isConnected() == false){
                Log.message(DebugLevel.Warnings | DebugLevel.Networking,"Cannot sent event "+event+" as client is not connected to a server.");
                return;
            }
            var object = {
                t: event,
                data:data
            };
            var serialiseObject =  serializer.serialize(object);
    
            var result = cnx.writeBytes(Bytes.ofString(serialiseObject + "\r\n"));
    }
  • c

    curved-king-43987

    08/23/2022, 10:01 PM
    This is from the mphx git
  • h

    hallowed-ocean-84954

    08/23/2022, 10:01 PM
    ok then so which line is puking ?
  • h

    hallowed-ocean-84954

    08/23/2022, 10:02 PM
    isConnected() or cnx.writeBytes() - I would guess it's one or the other
  • h

    hallowed-ocean-84954

    08/23/2022, 10:02 PM
    but guessing is a bad debug technique
  • c

    curved-king-43987

    08/23/2022, 10:02 PM
    I would say so
  • b

    best-oil-63421

    08/23/2022, 10:02 PM
    99 percent writeBytes
  • a

    ambitious-knife-25690

    08/23/2022, 10:02 PM
    EOF is a normal socket error, it is usually caused by the user. If it's a perpetual issue with the library itself then you need to post an issue on the git
  • b

    best-oil-63421

    08/23/2022, 10:03 PM
    it happens with socket.writeBytes like i said
  • a

    ambitious-knife-25690

    08/23/2022, 10:03 PM
    wait is mag part of the kirby crew?
  • c

    curved-king-43987

    08/23/2022, 10:03 PM
    FunkLine crew
  • a

    ambitious-knife-25690

    08/23/2022, 10:03 PM
    i don't know who that is
  • a

    ambitious-knife-25690

    08/23/2022, 10:03 PM
    this is confusing, i've been ignoring their messages assuming vidya was troubleshooting a different issue
  • b

    best-oil-63421

    08/23/2022, 10:04 PM
    the problem is; anytime i try to write anything to the socket at all, it's eof after eof after eof
1...789...57Latest