Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

For starters, please use <c>...</c> instead of <pre>...</pre>.

It looks like your object got stringified

$ perl -e' > sub method {} > my $o = bless({}); > $o->method(); # Ok > $o = "$o"; > $o->method(); > ' Can't locate object method "method" via package "main=HASH(0x814ec28)" + (perhaps you forgot to load "main=HASH(0x814ec28)"?) at -e line 6.

Tracing back I see you read a string from a file and expect it to magically become a socket handle. That's not gonna happen.

In fact, the handle gets closed at the end of PortConn as the last reference to it ($rethandle) goes out of scope.

The idea is fundamentally flawed. A handle is a token that represents a resource the OS has handed your process. The token is useless to any other process. If you want to store something, you need to store the connection details so you can re-establish the connection.


In reply to Re^3: Socket Handle not sending data ? by ikegami
in thread Socket Handle not sending data ? by evilkamikaze

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    Corion discovers a new shiny toy to try out over the (longish) weekend. Since I've done some more with websockets, maybe I'll try writing a webserver that implements hot-reloading of HTML(+CSS, +Javascript) in the browser. Edit the local file and ...
    [Corion]: ... the browser(s) get a ping to a) refresh the page or b) reload "just" the changed parts, keeping the scroll position etc.
    [Corion]: But I also have to look at how I can make WWW::Mechanize:: RemoteBrowser a reality, and how to make it safe from malicious content ;)
    [Corion]: Part of wanting hot-reloading is that I think I've stumbled on a very simple set of CSS that I maybe want to use for a blog, but I want to try that out on mobile too, and I also want to add/modify it slightly so it has a header too...
    [Corion]: ... and having hot reloading would make it easy to view the changes in multiple browser windows of different sizes, and on Android, simultaneously

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (7)
    As of 2018-04-26 10:49 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?