Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fredrick

Pages: [1] 2
1
Network / Re: TCP Send raw packet bugs
« on: April 21, 2015, 03:30:07 pm »
Quote from: zsbzsb
Quote
And lets say you got a partial write to socket before "not ready"... what do you then do? There is no way to finish the last bytes on the outside without shifting the data before you call  send again...

What? This makes no sense because if you get a partial response then you call send again with the pointer to your data just incremented to the new position.

I don't understand what you mean with "no sense", let me try to clarify :

I have already covered this but in summary: Instead of letting user deciding the pointer arithmetic and calling send again, they call send until its "Done" or break on "Error/Disconnect" with the updated ref  "sent" variable. This is cleaner and safer than casting user data structure to const char * on the outside.

Quote from: zsbzsb
Quote
A) Bug:

Socket::Status TcpSocket::send(const void* data, std::size_t size) at line 220 when returning not ready will not return with written as it does not have a ref.

Read the implementation again, the send() overload that doesn't include the sent overload will return Partial if only part of the data was sent. The only difference between the two functions is that one doesn't give the user the byte count that was sent. And there is no way to eliminate this function or change the signature without breaking the API.

I understand breaking the API is not a good solution, though that does not mean the current "send" implementation is a good design, that's why the send variant without the &sent for non blocking socket should be avoided at all costs in its current form, printing a warning and call it "good enough" is ridiculous . To maintain compatibility you can have a "secure" variant with the added prefix(es) or postfix(es) to send()



Quote from: zsbzsb
Quote
B) Better design :

Return written size to the caller domain (lib user) for all send functions (important for non blocking only),
user can then call send again with the same stack variable until "Done".

The sent byte count can't be returned in all functions, it is done where appropriate. There is no issue here other than with your mindset.

As an public library, as answered above this is not good enough from an objective position, has nothing to do with my mindset, grow up and take some responsibilities.


Quote from: zsbzsb
Quote
I have forked the socket portion of the library so i no longer rely on how you fix it

Mind linking to your repo then?

I have no link for it, its also ported to amalgamation so i am not sure how useful it is.

2
Network / Re: TCP Send raw packet bugs
« on: April 20, 2015, 11:26:30 pm »
Sure,

A) Bug:

Socket::Status TcpSocket::send(const void* data, std::size_t size) at line 220 when returning not ready will not return with written as it does not have a ref.

Edit: The user in this case does not really know how much was written to socket before it returned "not Ready", this function should be avoided at all cost in its current implementation, warning is not good enugh

B) Better design :

Return written size to the caller domain (lib user) for all send functions (important for non blocking only),
user can then call send again with the same stack variable until "Done".


I have forked the socket portion of the library so i no longer rely on how you fix it, just wanted to let you know that there is at least one bug in the current implementation (ignoring lack of consts)

3
Network / Re: TCP Send raw packet bugs
« on: April 20, 2015, 11:17:19 pm »
Problem is at line 225 TcpSocket.cpp (this threw me off originally) but now this is a  new bug if the current statement is the intention

4
Network / Re: TCP Send raw packet bugs
« on: April 20, 2015, 11:09:30 pm »
I now understand the original intention, but for non blocking sockets the current send function has little value for "not ready" as the caller needs to make sure next time that the remaining bytes is in the "0" position, this is not a good design.

5
Network / Re: TCP Send raw packet bugs
« on: April 20, 2015, 11:00:12 pm »
And lets say you got a partial write to socket before "not ready"... what do you then do? There is no way to finish the last bytes on the outside without shifting the data before you call  send again...

6
Network / Re: TCP Send raw packet bugs
« on: April 20, 2015, 10:51:10 pm »
Yes i do, and setting a ref back to value 0 in the for loop makes zero sense

7
Network / TCP Send raw packet bugs/Design flaws (Unresolved)
« on: April 20, 2015, 10:40:46 pm »
Quote
Socket::Status TcpSocket::send(const void* data, std::size_t size, std::size_t& sent)
{
    // Check the parameters
    if (!data || (size == 0))
    {
        err() << "Cannot send data over the network (no data to send)" << std::endl;
        return Error;
    }

    // Loop until every byte has been sent
    int result = 0;
    for (sent = 0; sent < size; sent += result)
    {
        // Send a chunk of data
        result = ::send(getHandle(), static_cast<const char*>(data) + sent, size - sent, flags);

        // Check for errors
        if (result < 0)
        {
            Status status = priv::SocketImpl::getErrorStatus();

            if ((status == NotReady) && sent)
                return Partial;

            return status;
        }
    }

    return Done;
}

Should be:

Quote
Socket::Status TcpSocket::send(const void* data, const std::size_t size, std::size_t& sent)
{
    // Check the parameters
    if (!data || (size == 0))
    {
        err() << "Cannot send data over the network (no data to send)" << std::endl;
        return Error;
    }

     if (sent >= size)
    {
        err() << "Cannot send data, size error"  << std::endl;
        return Error;
    }

    // Loop until every byte has been sent
    int result = 0;
    for (; sent < size; sent += result)
    {
        // Send a chunk of data
        result = ::send(getHandle(), static_cast<const char*>(data) + sent, size - sent, flags);

        // Check for errors
        if (result < 0)
        {
            Status status = priv::SocketImpl::getErrorStatus();

            if ((status == NotReady) && sent)
                return Partial;

            return status;
        }
    }

    return Done;
}

You may need to check where this "send()" is called internally and update as needed to utilize "resume"

8
Graphics / Re: static sf::graphics library fails to link
« on: October 21, 2012, 02:45:57 pm »
I was hoping to prevent printing this, but here you go (You have dll export in your static ext libraries, which is wrong)

Quote
15>sfml-graphics-s-d.lib(ftbase.obj) : warning LNK4217: locally defined symbol _strrchr imported in function _raccess_make_file_name
15>sfml-graphics-s-d.lib(type1.obj) : warning LNK4049: locally defined symbol _memmove imported
15>sfml-graphics-s-d.lib(truetype.obj) : warning LNK4049: locally defined symbol _memmove imported
15>sfml-graphics-s-d.lib(ftlzw.obj) : warning LNK4049: locally defined symbol _memmove imported
15>sfml-graphics-s-d.lib(ftbase.obj) : warning LNK4217: locally defined symbol _memmove imported in function _FT_GlyphLoader_CheckPoints
15>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4049: locally defined symbol _memmove imported
15>sfml-graphics-s-d.lib(pshinter.obj) : warning LNK4049: locally defined symbol _memmove imported
15>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _memmove imported
15>sfml-graphics-s-d.lib(bdf.obj) : warning LNK4217: locally defined symbol _sprintf imported in function __bdf_parse_properties
15>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4049: locally defined symbol _sprintf imported
15>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4217: locally defined symbol _memchr imported in function _tt_face_find_bdf_prop
15>sfml-graphics-s-d.lib(cff.obj) : warning LNK4049: locally defined symbol _strncmp imported
15>sfml-graphics-s-d.lib(type1.obj) : warning LNK4049: locally defined symbol _strncmp imported
15>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4217: locally defined symbol _strncmp imported in function _tt_face_find_bdf_prop
15>sfml-graphics-s-d.lib(psaux.obj) : warning LNK4217: locally defined symbol _strncmp imported in function _afm_parser_parse
15>sfml-graphics-s-d.lib(type42.obj) : warning LNK4049: locally defined symbol _strncmp imported
15>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _strncmp imported
15>sfml-graphics-s-d.lib(type42.obj) : warning LNK4217: locally defined symbol _atol imported in function _t42_get_name_index
15>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _atol imported
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _malloc imported in function _ft_alloc
15>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4049: locally defined symbol _malloc imported
15>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4217: locally defined symbol _malloc imported in function _jpeg_get_small
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _realloc imported in function _ft_realloc
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _free imported in function _ft_free
15>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4049: locally defined symbol _free imported
15>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4049: locally defined symbol _free imported
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fclose imported in function _ft_ansi_stream_close
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fread imported in function _ft_ansi_stream_io
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fseek imported in function _ft_ansi_stream_io
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _ftell imported in function _FT_Stream_Open
15>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fopen imported in function _FT_Stream_Open
15>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol _exit imported in function _error_exit
15>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _output_message
15>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fwrite imported in function _empty_output_buffer
15>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _ferror imported in function _term_destination
15>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fflush imported in function _term_destination
15>sfml-graphics-s-d.lib(jmemmgr.obj) : warning LNK4217: locally defined symbol _getenv imported in function _jinit_memory_mgr
15>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__longjmp referenced in function _ft_validator_error
15>sfml-graphics-s-d.lib(smooth.obj) : error LNK2001: unresolved external symbol __imp__longjmp
15>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__strncpy referenced in function _raccess_make_file_name
15>sfml-graphics-s-d.lib(type1.obj) : error LNK2001: unresolved external symbol __imp__qsort
15>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__qsort referenced in function _FT_Raccess_Get_DataOffsets
15>sfml-graphics-s-d.lib(bdf.obj) : error LNK2001: unresolved external symbol __imp__qsort
15>sfml-graphics-s-d.lib(psmodule.obj) : error LNK2001: unresolved external symbol __imp__qsort
15>sfml-graphics-s-d.lib(psaux.obj) : error LNK2001: unresolved external symbol __imp__qsort
15>sfml-graphics-s-d.lib(truetype.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function _tt_check_trickyness_family
15>sfml-graphics-s-d.lib(jerror.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _output_message
15>sfml-graphics-s-d.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _jinit_memory_mgr
15>C:\LaurentGomila-SFML-121cfeb\build\examples\pong\Debug\pong-d.exe : fatal error LNK1120: 6 unresolved externals
16>sfml-graphics-s-d.lib(ftbase.obj) : warning LNK4217: locally defined symbol _strrchr imported in function _raccess_make_file_name
16>sfml-graphics-s-d.lib(type1.obj) : warning LNK4049: locally defined symbol _memmove imported
16>sfml-graphics-s-d.lib(truetype.obj) : warning LNK4049: locally defined symbol _memmove imported
16>sfml-graphics-s-d.lib(ftlzw.obj) : warning LNK4049: locally defined symbol _memmove imported
16>sfml-graphics-s-d.lib(ftbase.obj) : warning LNK4217: locally defined symbol _memmove imported in function _FT_GlyphLoader_CheckPoints
16>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4049: locally defined symbol _memmove imported
16>sfml-graphics-s-d.lib(pshinter.obj) : warning LNK4049: locally defined symbol _memmove imported
16>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _memmove imported
16>sfml-graphics-s-d.lib(bdf.obj) : warning LNK4217: locally defined symbol _sprintf imported in function __bdf_parse_properties
16>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4049: locally defined symbol _sprintf imported
16>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4217: locally defined symbol _memchr imported in function _tt_face_find_bdf_prop
16>sfml-graphics-s-d.lib(cff.obj) : warning LNK4049: locally defined symbol _strncmp imported
16>sfml-graphics-s-d.lib(type1.obj) : warning LNK4049: locally defined symbol _strncmp imported
16>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4217: locally defined symbol _strncmp imported in function _tt_face_find_bdf_prop
16>sfml-graphics-s-d.lib(psaux.obj) : warning LNK4217: locally defined symbol _strncmp imported in function _afm_parser_parse
16>sfml-graphics-s-d.lib(type42.obj) : warning LNK4049: locally defined symbol _strncmp imported
16>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _strncmp imported
16>sfml-graphics-s-d.lib(type42.obj) : warning LNK4217: locally defined symbol _atol imported in function _t42_get_name_index
16>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _atol imported
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _malloc imported in function _ft_alloc
16>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4049: locally defined symbol _malloc imported
16>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4217: locally defined symbol _malloc imported in function _jpeg_get_small
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _realloc imported in function _ft_realloc
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _free imported in function _ft_free
16>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4049: locally defined symbol _free imported
16>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4049: locally defined symbol _free imported
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fclose imported in function _ft_ansi_stream_close
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fread imported in function _ft_ansi_stream_io
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fseek imported in function _ft_ansi_stream_io
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _ftell imported in function _FT_Stream_Open
16>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fopen imported in function _FT_Stream_Open
16>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol _exit imported in function _error_exit
16>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _output_message
16>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fwrite imported in function _empty_output_buffer
16>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _ferror imported in function _term_destination
16>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fflush imported in function _term_destination
16>sfml-graphics-s-d.lib(jmemmgr.obj) : warning LNK4217: locally defined symbol _getenv imported in function _jinit_memory_mgr
16>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__longjmp referenced in function _ft_validator_error
16>sfml-graphics-s-d.lib(smooth.obj) : error LNK2001: unresolved external symbol __imp__longjmp
16>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__strncpy referenced in function _raccess_make_file_name
16>sfml-graphics-s-d.lib(type1.obj) : error LNK2001: unresolved external symbol __imp__qsort
16>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__qsort referenced in function _FT_Raccess_Get_DataOffsets
16>sfml-graphics-s-d.lib(bdf.obj) : error LNK2001: unresolved external symbol __imp__qsort
16>sfml-graphics-s-d.lib(psmodule.obj) : error LNK2001: unresolved external symbol __imp__qsort
16>sfml-graphics-s-d.lib(psaux.obj) : error LNK2001: unresolved external symbol __imp__qsort
16>sfml-graphics-s-d.lib(truetype.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function _tt_check_trickyness_family
16>sfml-graphics-s-d.lib(jerror.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _output_message
16>sfml-graphics-s-d.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _jinit_memory_mgr
16>C:\LaurentGomila-SFML-121cfeb\build\examples\shader\Debug\shader-d.exe : fatal error LNK1120: 6 unresolved externals
17>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol _exit imported in function _error_exit
17>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _output_message
17>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol _sprintf imported in function _format_message
17>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fwrite imported in function _empty_output_buffer
17>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _free imported in function _empty_mem_output_buffer
17>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4049: locally defined symbol _free imported
17>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _malloc imported in function _empty_mem_output_buffer
17>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4049: locally defined symbol _malloc imported
17>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _ferror imported in function _term_destination
17>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fflush imported in function _term_destination
17>sfml-graphics-s-d.lib(jmemmgr.obj) : warning LNK4217: locally defined symbol _getenv imported in function _jinit_memory_mgr
17>sfml-graphics-s-d.lib(jerror.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _output_message
17>sfml-graphics-s-d.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _jinit_memory_mgr
17>C:\LaurentGomila-SFML-121cfeb\build\examples\win32\Debug\win32-d.exe : fatal error LNK1120: 2 unresolved externals
14>sfml-graphics-s-d.lib(ftbase.obj) : warning LNK4217: locally defined symbol _strrchr imported in function _raccess_make_file_name
14>sfml-graphics-s-d.lib(type1.obj) : warning LNK4049: locally defined symbol _memmove imported
14>sfml-graphics-s-d.lib(truetype.obj) : warning LNK4049: locally defined symbol _memmove imported
14>sfml-graphics-s-d.lib(ftlzw.obj) : warning LNK4049: locally defined symbol _memmove imported
14>sfml-graphics-s-d.lib(ftbase.obj) : warning LNK4217: locally defined symbol _memmove imported in function _FT_GlyphLoader_CheckPoints
14>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4049: locally defined symbol _memmove imported
14>sfml-graphics-s-d.lib(pshinter.obj) : warning LNK4049: locally defined symbol _memmove imported
14>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _memmove imported
14>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol _exit imported in function _error_exit
14>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol ___iob_func imported in function _output_message
14>sfml-graphics-s-d.lib(jerror.obj) : warning LNK4217: locally defined symbol _sprintf imported in function _format_message
14>sfml-graphics-s-d.lib(bdf.obj) : warning LNK4049: locally defined symbol _sprintf imported
14>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fwrite imported in function _empty_output_buffer
14>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _free imported in function _empty_mem_output_buffer
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4049: locally defined symbol _free imported
14>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4049: locally defined symbol _free imported
14>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _malloc imported in function _empty_mem_output_buffer
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4049: locally defined symbol _malloc imported
14>sfml-graphics-s-d.lib(jmemnobs.obj) : warning LNK4049: locally defined symbol _malloc imported
14>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _ferror imported in function _term_destination
14>sfml-graphics-s-d.lib(jdatadst.obj) : warning LNK4217: locally defined symbol _fflush imported in function _term_destination
14>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4217: locally defined symbol _memchr imported in function _tt_face_find_bdf_prop
14>sfml-graphics-s-d.lib(cff.obj) : warning LNK4049: locally defined symbol _strncmp imported
14>sfml-graphics-s-d.lib(type1.obj) : warning LNK4049: locally defined symbol _strncmp imported
14>sfml-graphics-s-d.lib(sfnt.obj) : warning LNK4217: locally defined symbol _strncmp imported in function _tt_face_find_bdf_prop
14>sfml-graphics-s-d.lib(psaux.obj) : warning LNK4217: locally defined symbol _strncmp imported in function _afm_parser_parse
14>sfml-graphics-s-d.lib(type42.obj) : warning LNK4049: locally defined symbol _strncmp imported
14>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _strncmp imported
14>sfml-graphics-s-d.lib(type42.obj) : warning LNK4217: locally defined symbol _atol imported in function _t42_get_name_index
14>sfml-graphics-s-d.lib(type1cid.obj) : warning LNK4049: locally defined symbol _atol imported
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _realloc imported in function _ft_realloc
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fclose imported in function _ft_ansi_stream_close
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fread imported in function _ft_ansi_stream_io
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fseek imported in function _ft_ansi_stream_io
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _ftell imported in function _FT_Stream_Open
14>sfml-graphics-s-d.lib(ftsystem.obj) : warning LNK4217: locally defined symbol _fopen imported in function _FT_Stream_Open
14>sfml-graphics-s-d.lib(jmemmgr.obj) : warning LNK4217: locally defined symbol _getenv imported in function _jinit_memory_mgr
14>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__longjmp referenced in function _ft_validator_error
14>sfml-graphics-s-d.lib(smooth.obj) : error LNK2001: unresolved external symbol __imp__longjmp
14>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__strncpy referenced in function _raccess_make_file_name
14>sfml-graphics-s-d.lib(type1.obj) : error LNK2001: unresolved external symbol __imp__qsort
14>sfml-graphics-s-d.lib(ftbase.obj) : error LNK2019: unresolved external symbol __imp__qsort referenced in function _FT_Raccess_Get_DataOffsets
14>sfml-graphics-s-d.lib(bdf.obj) : error LNK2001: unresolved external symbol __imp__qsort
14>sfml-graphics-s-d.lib(psmodule.obj) : error LNK2001: unresolved external symbol __imp__qsort
14>sfml-graphics-s-d.lib(psaux.obj) : error LNK2001: unresolved external symbol __imp__qsort
14>sfml-graphics-s-d.lib(jerror.obj) : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _output_message
14>sfml-graphics-s-d.lib(truetype.obj) : error LNK2019: unresolved external symbol __imp__strstr referenced in function _tt_check_trickyness_family
14>sfml-graphics-s-d.lib(jmemmgr.obj) : error LNK2019: unresolved external symbol __imp__sscanf referenced in function _jinit_memory_mgr

9
General discussions / Re: VS Memory Leak Trolls me?
« on: October 21, 2012, 03:51:53 am »
Yes, especially since CRTDump is called before, in many cases before ~dstr is called on exit.

Better to use 3rd party solutions, one example which you may already have available is  the "Analyze" toolkit. It is OK if you have it available in VS (Non Express)

10
Graphics / static sf::graphics library fails to link
« on: October 21, 2012, 03:45:47 am »
https://github.com/SFML/SFML/commit/26fa99f1975e1bcd6ac4adbefa23195d7124eca3

Change above, broke my compilation building SFML in static mode, the SFML graphics module failed while the others built fine.

A few revisions before (which was my backup) builds fine.

SFML_STATIC set, MT set, SFML sln generated via CMAKE for VS 2012, static. Also the SFML example opengl, fails.


11
Network / SFML 2.0 TCP reliability question (SOLVED)
« on: December 28, 2011, 06:18:47 pm »
ok thanks for the clarification

12
Network / SFML 2.0 TCP reliability question (SOLVED)
« on: December 28, 2011, 03:35:09 pm »
No i don't have had any issues with those other libraries, but they may be grouping them for me.

One thing i liked with Qt was that the "send" function return how much was written (or buffered) on the socket, i guess each time SFML returns DONE it is done but there must be cases where it skips whole chunks when it returns not done and i have to re-send it or does it buffer it for me perhaps.

And yes i have things to read up on regarding TCP, thanks for taking time to answering my questions  :wink:

13
Network / SFML 2.0 TCP reliability question (SOLVED)
« on: December 28, 2011, 01:26:52 pm »
Why would we care about getting the size of data on the lower part of the protocol, all i care about is the size of the payload.

Edit:

Also whats the point using TCP if i cant rebuild the same data on the receiving end as compared to the sending end?

14
Network / SFML 2.0 TCP reliability question (SOLVED)
« on: December 28, 2011, 12:40:21 pm »
It has been a while since i last gave SFML networking a try, i wanted to give it a go after using other API's (Qt Networking\Boost::Asio)

There is a few things i don't understand, let me give a few examples.

Packet sizes:

Sending a sample with 999 bytes, to a receiver (server) reads the size of the data randomly, either less than 999 bytes (still within MTU!) or strangely more often with more data than i specified...

Code of sender....

Code: [Select]
sf::TcpSocket socket;
if (socket.Connect("localhost", 25001) == sf::TcpSocket::Done) {
printf("Connected to server\n");

char packet[1024] = "";
for (int i = 0; i < 100; i++) {
memset(packet, 0x01, 999);
if (sf::TcpSocket::Done == socket.Send(packet, 999)) {
printf("Packet sent to server\n");
}
else {
printf("Failed to send packet to server\n");
}
}

}
else {
printf("Failed to connect to server\n");
}



Code of receiver:


Code: [Select]
while (true) {
size_t receivedSize = 0;
sf::TcpSocket::Status status = clientSocket->Receive(packet, sizeof(packet), receivedSize);
if (status == sf::TcpSocket::Done) {
handleClientPacket(packet, receivedSize);
}
else if (status == sf::TcpSocket::Error ||
status == sf::TcpSocket::Disconnected) {
printf("Packet error or disconnection\n");
break;
}
else {
// Not yet ready
sf::Sleep(10);
}
}

Code: [Select]

void Server::handleClientPacket(const char *data, size_t size)
{
printf("Packet %d with size %u\n", m_packetCount++, size);
}



results:

...
Packet 34 with size 999
Packet 35 with size 999
Packet 36 with size 999
Packet 37 with size 999
Packet 38 with size 999
Packet 39 with size 999
Packet 40 with size 999
Packet 41 with size 999
Packet 42 with size 999
Packet 43 with size 999
Packet 44 with size 999
Packet 45 with size 999
Packet 46 with size 999
Packet 47 with size 1024
Packet 48 with size 1024
Packet 49 with size 1024
Packet 50 with size 1024
Packet 51 with size 1024
Packet 52 with size 1024
Packet 53 with size 1024
Packet 54 with size 1024
Packet 55 with size 1024
Packet 56 with size 1024
Packet 57 with size 1024
Packet 58 with size 1024
Packet 59 with size 1024
Packet 60 with size 1024
Packet 61 with size 1024
Packet 62 with size 624
Packet 63 with size 999
Packet 64 with size 999
Packet 65 with size 999
Packet 66 with size 999
Packet 67 with size 1024


etc... very strange, my questions is why? I expected 999.. yes OS socket buffer was filled up at some point, i want to know why the socket wrote more than what i specified...


I have a few other remarks but lets start with this one..

15
Network / SFML Network buffer question
« on: January 22, 2010, 02:24:08 pm »
is there any extra overhead \ packet size cost of using sfml packet structure. ?

I went for raw data so i was able to construct a 3 byte packet header for packet types + size ( unsigned char packetType , unsigned short packetSize).

I guess i should use UDP if i am that concerned about header size but that was the route i took while planing the framework.

Pages: [1] 2
anything