Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    XITASO GmbH
    @xitasoappdev
    Has anyone had a similar issue befor?
    Thanks for your help!
    Georgi Krachmarov
    @krachmarov
    Hello, I am having trouble with:
    var client = new TcpSocketClient();
    await client.ConnectAsync("127.0.0.1", 7812);
    on Android device it doesn't work
    on windows it is working
    same pcl package
    any idea?
    Georgi Krachmarov
    @krachmarov
    i updated xamarin forms and xamarin to latest versions and results are same
    in the same project project.windows is able to connect but project.droid not
    Georgi Krachmarov
    @krachmarov
    Solved. I was missing internet permission in android manifest
    ChristophvanderFecht
    @ChristophvanderFecht
    HI!
    I have a question to the UdpSocketMulticastClient

    I am fairly new to the topic, so sorry for asking stupid questions.
    When I fetch all nt interfaces using the CommsInterface.GetAllInterfacesAsync(), and provide this info to the UdpSocketMulticastClient.JoinMulticastGroupAsync() with the interfaces broadcast address, port = 50002, and the interface itself I always receive the following error

    The parameter is incorrect. 'host': This is not a valid multicast address.

    Address provided for example is 10.5.2.255. Any ideas?

    THX

    Randy Hash
    @hashr25
    Hey there. I have a question about calling a web service with the TCP client. Anyone available to help me?
    Darren Whitfield
    @NewAmbition
    Hey guys - anyone here
    Craig Baranyai
    @CraigRBI
    Question about security (I'm new to networking) - I'm assuming the stream used to transmit data isn't using an SSL encryption, is it possible to transmit data via a secure stream when using PCL?
    Ryan Davis
    @rdavisau
    @CraigRBI Hi - there is a 'secure' option on TcpSocketClient's ConnectAsync that may be what you're after
    @ChristophvanderFecht sorry for the late reply, multicast must be done over a specific range of valid multicast addresses, i think 224.0.0.0 to 239.255.255.255 per https://en.wikipedia.org/wiki/Multicast_address
    B. Ugur Demirkan
    @MeantCoder
    Hello i have problem with socket plugin output is :
    System.NotImplementedException: The empty PCL implementation for Sockets was loaded. Ensure you have added the Sockets nuget package to each of your platform projects.
    Thanks :)
    kostyamba
    @kostyamba
    hello, why the UdpSocketReceiver may not work in the windows store application?
    RIYAZ
    @rzee7
    Hey Guys
    Quick Question:
    Can we use it to connect iOS and Android devices together with this plugin?
    Vivek Srivastav
    @vivu12585_twitter
    Hello everyone, I am trying plug-in to send and receive files but I m getting “me
    Vivek Srivastav
    @vivu12585_twitter
    Message is too long error
    I am using 2.0.2 version and UDPSocket Client
    Ryan Davis
    @rdavisau
    @vivu12585_twitter how long is your message? 🤔 Not that I've tested it, but from browsing the web, the maximum size for a UDP message is probably 64kb
    For file transfer I would strongly recommend using a TCP socket in any case
    Vivek Srivastav
    @vivu12585_twitter
    Hi Ryan thanks for your suggestion I implemented the TCP socket but on receiver end I am unable to receive the bytes ?? And also not getting any error
    I am trying to send zip file of 148 kB approx
    Ryan Davis
    @rdavisau
    Sounds like a typical use case so it should be supported - can you open an issue and include the code you're using on the sending and receiving ends? Also the platforms of the sender/receiver and whether any are running in an emulator/simulator
    In case it helps you could check the TCP samples here https://github.com/rdavisau/sockets-for-pcl/tree/dev/Sockets/linqpad-samples/Tcp . They are linqpad queries but you can just look at them and maybe it will highlight something that's missing. You could check the TcpSocketClient.linq and TcpSocketListener.linq files as examples of how the sender and receiver could work
    (though looking at them now I would recommend a larger buffer size)
    Vivek Srivastav
    @vivu12585_twitter
    Thanks a lot @rdavisau you suggestion worked like charm !!!! Now I am able to send and receive files using socket-for-pcl plugin.
    I would like to ask one more question - Do you have discovery functionality support in your plugin. Actually I would like to discover the devices which connect on same network
    please let me know, if socket-for-pcl plugin supports such functionality
    Ryan Davis
    @rdavisau
    glad to hear it's working :)
    for discovery, you can use udp sockets - each device listens with a udp on a specified port (not the one you use for your TCP operations).. to find these devices, the searching device sends a UDP broadcast message (255.255.255.255) to that port - and when the listeners respond you will get their addresses (they could also send back other details like their names, etc.)
    but you might be able to find a library that can do this for you..
    Vivek Srivastav
    @vivu12585_twitter
    Thanks a lot for the pointers !! I am planning to use
    Apple Bonjour API for discovery
    Vivek Srivastav
    @vivu12585_twitter
    Hi @rdavisau - I am using rda-socket library > UdpSocketMulticastClient to discover all the devices available in my network. Using the UdpSocketMulticastClient lib I am able to receive the broadcast message. Now i want to send the acknowledgement to sender who initiated broadcasting, Can you guide me which method I can use to send acknowledgement after receiving the multicast message
    Ryan Davis
    @rdavisau
    hi @vivu12585_twitter - I'd have the broadcaster also run a listener (either udp or tcp depending on how you want the two parties to interact), then the party that is responding to the broadcast can send/connect to that. if the listen port needs to be dynamic, the broadcaster can send that information as part of it's broadcast message. you can get the details about the broadcaster from the message received event arguments
    tuanphamblogic
    @tuanphamblogic
    Could someone please help me how to check TcpSocketClient is connected ?
    Ryan Davis
    @rdavisau
    @tuanphamblogic you can try try wrapper: https://gist.github.com/rdavisau/7b466c855118a00c901a though i haven't used it in a long time
    tuanphamblogic
    @tuanphamblogic
    @rdavisau : thanks Davis, but I just want check current TcpSocketClient is connected or not. If not, I will connect. Curently, I'm using WriteStream?.CanWrite to check, but it seem not correct
    Ryan Davis
    @rdavisau
    from memory it's actually difficult to reliably know whether the socket is connected using any properties on the socket (e.g. some discussion here https://stackoverflow.com/questions/2661764/how-to-check-if-a-socket-is-connected-disconnected-in-c). The general advice I took from that is that you need to try reading to truly know whether you are still connected, which is what the BetterTcpSocketClient does in the above example. You could add an IsConnected property to BetterTcpSocketClient and update it based on the Connected/Disconnected events
    tuanphamblogic
    @tuanphamblogic
    @rdavisau : yes, thank you so much. I'll try with your way.
    MeNU49
    @MeNU49
    Hello, I am new to the entire connection using UDP and TCP. It is required for a project of mine and just looking at your github repo, I am lost on what the functions really do. I am lost on the entire port thing as well, yes I am that new. I would like to know if you recommend anything as a beginner, to start understanding how to use your plugin properly ? Thanks for the advice in advance