| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 hints.ai_family = AF_INET; | 732 hints.ai_family = AF_INET; |
| 733 hints.ai_socktype = SOCK_STREAM; | 733 hints.ai_socktype = SOCK_STREAM; |
| 734 hints.ai_protocol = IPPROTO_TCP; | 734 hints.ai_protocol = IPPROTO_TCP; |
| 735 int status = getaddrinfo(host, port, &hints, &result); | 735 int status = getaddrinfo(host, port, &hints, &result); |
| 736 if (status != 0) { | 736 if (status != 0) { |
| 737 return false; | 737 return false; |
| 738 } | 738 } |
| 739 | 739 |
| 740 // Connect. | 740 // Connect. |
| 741 status = connect(socket_, result->ai_addr, result->ai_addrlen); | 741 status = connect(socket_, result->ai_addr, result->ai_addrlen); |
| 742 freeaddrinfo(result); |
| 742 return status == 0; | 743 return status == 0; |
| 743 } | 744 } |
| 744 | 745 |
| 745 | 746 |
| 746 int LinuxSocket::Send(const char* data, int len) const { | 747 int LinuxSocket::Send(const char* data, int len) const { |
| 747 int status = send(socket_, data, len, 0); | 748 int status = send(socket_, data, len, 0); |
| 748 return status; | 749 return status; |
| 749 } | 750 } |
| 750 | 751 |
| 751 | 752 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 } | 885 } |
| 885 | 886 |
| 886 // This sampler is no longer the active sampler. | 887 // This sampler is no longer the active sampler. |
| 887 active_sampler_ = NULL; | 888 active_sampler_ = NULL; |
| 888 active_ = false; | 889 active_ = false; |
| 889 } | 890 } |
| 890 | 891 |
| 891 #endif // ENABLE_LOGGING_AND_PROFILING | 892 #endif // ENABLE_LOGGING_AND_PROFILING |
| 892 | 893 |
| 893 } } // namespace v8::internal | 894 } } // namespace v8::internal |
| OLD | NEW |