how to change ebay credit card info citibank credit cards rewards points redemption 24 hour online cash loans halifax credit card helpline credit card processing companies for bad credit citibank indian oil credit card online application chase credit card protection insurance instant payday loan direct lender check premier credit card status hdfc credit card payment online from other bank hsbc credit card points singapore best reward credit card 2013 no annual fee anz platinum credit card free travel insurance iphone credit card app uk sampath credit card promotions 2013 disputing credit card charges visa citi corporate credit card login secured credit cards for bad credit with low deposit mbna credit card canada phone number credit cards with no credit check instant approval virgin credit card phone number contact paypal credit card payments uk apply for barclays credit card us bmo mastercard contact bad credit loan lenders 5000 bank of america student credit card no credit history how to apply for a credit card online with no credit can you get credit cards after filing bankruptcy credit card processing for small business canada credit card with bad credit history australia bad credit credit card applications elavon credit card processing software citibank credit card is the amazon visa card a credit card everyday rewards cards woolworths citibank sears credit card login us average credit card apr delta credit card offer 2012 chase credit card payment history 6 best credit cards for bad credit compare credit card rates free credit cards that works info how to get a car loan with bad credit australia circuit city credit card customer service best visa credit card for college student best payday lenders bad credit usaa amex credit card reviews apply for a mastercard online canada myer visa card rewards virtual credit card prepaid paypal aqua credit card contact hdfc premium credit cards best buy credit card no interest for 18 months best online cash loans can you buy a money order with a credit card at the post office how do i get my first credit card with no credit history best payday loans online uk payday instant cash loans marriott credit card uk halifax chase visa credit card my account best interest free credit card purchases how to sign up for netflix free trial without credit card or paypal barclays black card credit limit annual gold card tfl nab credit card balance transfer offers apply for a mastercard debit card best credit card interest rates uk citibank india credit card international transaction charges icici credit card online payment easy pay how to change credit card on iphone app store i need a secured credit card to build my credit american express platinum card login the best cash rebate credit card in malaysia hdfc gold credit card withdrawal limit what is the best secured credit card to get in canada payday title loans online unsecured credit card to rebuild credit best credit card terminal rates uk best no fee credit card canada 2012 new payday loan lenders uk 2013 getting a credit card in the us how do u apply for a walmart credit card how to change iphone credit card details limit on black visa credit cards credit card authorization form template word free visa cards numbers valid security code for visa card generator top credit card for travel credit card reward schemes compared payday loans online decision discover cash back rewards credit cards unsecured credit cards bad credit no bank account instant credit card approval with bad credit canada get post bankruptcy credit cards good credit cards to have update apple credit card info best visa credit card for business rfid protected from credit card scanners credit card charge approval form no interest on new purchases credit cards laws for credit card frauds in india citibank credit card applying online how to lower your credit card interest rate hdfc credit card review india wells fargo visa credit card customer service phone number hdfc credit card deals and offers how to review my apple id without credit card credit card after bankruptcy uk uob credit card rewards redemption malaysia payday lenders no credit check best uk credit cards for students best credit card rewards programs australia city bank credit card bill payment online best credit cards for not so good credit credit card reviews 2013 canada barclays platinum card benefits credit card machine hire uk best reward credit cards 2013 no annual fee mobile credit card processing iphone paypal capital one credit card review canada best credit card singapore compare credit card consolidation loan companies best transfer balance credit cards 2013 guaranteed credit card approval for bad credit canada bad credit credit cards no deposit instant approval promo credit card bank mega major credit card companies usa tesco clubcard credit card online how to best use a secured credit card to build credit best cashback credit card singapore where else can i use my lane bryant credit card prepaid company credit cards credit card rewards comparison india how to eliminate credit card debt with forms cheapest credit card processing online free credit card numbers with cvv code lost visa card uk chase reward cards reviews college student credit cards no credit history credit card processing for small business reviews bad credit loan calculator uk citibank cash back credit card review international credit card fees class action ipad credit card app best chase credit card rates 2013 discover credit card student loan valero gas credit card application advance payday loans online no credit check capital one credit cards for business can you apply for a maurices credit card online how can i opt out of credit card offers suze orman paying off credit card debt 2012 paying off credit card debt too fast how to verify paypal account with virtual credit card visa credit card info generator first financial bank usa credit card review citibank credit cards online payment apply for value city credit card ace cash express payday loans reviews what does referred mean on a credit card application credit cards visa vs mastercard qantas frequent flyer credit card no annual fee fidelity cash back credit card reviews barclays credit card lost cards compare credit cards for bad credit bank of america no interest credit card lifetime free credit cards in india 2012 credit card debt help for veterans amazon visa card major credit cards companies bank of america credit card settlement department gold card hostelworld hdfc credit cards visa signature best uk credit cards to use in usa a review of islamic credit card models in malaysia online loans direct lenders only activate new usaa credit card best reward credit cards for students data mining techniques for credit card fraud detection lord and taylor credit card customer service phone citibank credit card loan interest rate sears credit card payment address usaa credit card rewards catalog capital one credit card services login credit card credit score 700 iphone credit card machine with printer do visa debit cards work in japan new credit card laws minimum payment credit card processing app for blackberry how to get reward points in hdfc titanium credit card pay weekly loans on benefits best student credit cards with no credit history sign up for a credit card for free bank of america travel credit card rfid credit card protector credit card amount checker online sears credit card applications online capitec personal loan online application how to become a credit card merchant capital one secured credit card forum uk credit card for business account credit card application processing time advance america payday loans reviews credit card balance transfer offers malaysia visa credit card 10000 limit i need a credit card to help build my credit apple credit card scanner marriott wardman park credit card authorization form bj;s visa card application status hdfc credit card charges very bad credit payday loans 12 months interest free credit card uk starwood preferred guest credit card business cash advances definition how long after bankruptcy discharge can i get a credit card compare credit cards with free travel insurance best credit cards to use abroad 2011 paypal credit card verification fee best free credit cards canada value city credit card services credit card loan no credit history credit cards unsecured free sign up for credit card icici credit card reward points mint barclays lost credit card usa online merchandise credit cards for bad credit anz credit card travel insurance policy the best credit cards to use abroad how much does a mobile credit card machine cost amazon visa rewards card login commonwealth bank credit cards contact payday loan lender uk icici bank instant titanium credit card benefits can you get a walmart credit card with no credit history how to start accepting credit cards for my business template letter to credit card company credit cards bad credit no deposit no processing fee interest free credit card offers no fee balance transfers bank of america secured credit card deposit hdfc credit card discount offers ebay td bank low interest credit cards best credit card to rebuild credit score best credit cards offers 2011 in india how does chase apply credit card payments chase business credit card no foreign transaction fee credit cards apply online instant approval citibank corporate credit card online payment icici platinum credit cards offers no credit check credit cards nz best prepaid reloadable credit cards cimb student credit card malaysia bad credit loans compare the market credit card debt help reviews main types of credit card fraud store rewards cards on iphone vanquis credit card uk contact number payday loan no credit check online no interest credit cards bad credit hdfc international credit card paying off credit card debt help credit score top 5 credit card companies us top iphone credit card processing app quick cash payday loans san antonio us bank credit card payment citibank credit card offer what is the minimum payment on a tesco credit card standard chartered apply for credit card online secured visa canada credit card nandos black card buy best site to compare credit cards national city bank credit card services do department store credit cards hurt your credit best credit cards for bankruptcy filers easy unsecured credit card for bad credit mastercard credit card application for bad credit credit card transfer deals uk business credit card natwest online barclay credit card login india online secured credit cards card applications fee free balance transfer credit card what is credit card number maestro quick no credit loans company credit card policy and procedures what is the cash advance fee for wells fargo credit card www capitalone com creditcards matrix discover credit card visa cards start with what numbers how to get a credit card instantly online hdfc credit card 0 emi offer on gold vanquis credit card uk login 3 major credit card reporting agencies guaranteed unsecured credit card with bad credit capital one credit card woolworths black credit card application cheap car finance bad credit interest free credit card offers uk hsbc online application for credit card visa business credit cards with rewards canadian low rate credit cards travel credit card comparison calculator pay shell oil credit card online top 0 balance transfer credit cards credit union credit cards canada help paying off credit card debt government help apply for capital one credit card uk hdfc credit card payment through sbi credit card factors to consider when comparing credit cards easy cash loans no credit checks are there any fixed rate credit cards anymore best business credit cards no annual fee travel rewards cards compared merchant account online credit card processing halifax credit card application process everyday rewards cards au credit cards travel abroad the first credit card (diners) invented by ralph schneider credit card companies with uk call centre my virgin credit card rfid scanner credit card reader chase business reward cards paypal credit card reader how to eliminate credit card debt fast best unsecured credit card after bankruptcy discharge home depot credit card application for business easiest credit card approval australia business credit card low interest rates td bank first credit card rewards cards app android can i pay for a money order with a credit card at the post office anz business visa debit card can i get a capital one credit card with bad credit cash advances near me compare chase credit cards gas cards for not so good credit bank of america pre-approved credit card offers walmart store card credit score ebay uk credit card payment easiest credit card to get approved for philippines how do i pay my belk credit card standard chartered credit card reward points redeem balance transfer credit cards no annual fee discover credit card payment sam;s club lane bryant credit card application how to get out of credit card debt fast who oversees credit card issuers apr for cash advances list of 12 month payday loans how to apply for a credit card at target credit cards in canada with lowest interest rates best credit card business rewards visa prepaid cash card india list of credit cards used in uk applying for a credit card online vs in person going over credit limit bank of america guaranteed unsecured credit card bad credit virgin credit card balance transfer contact number credit card with best airline rewards best credit card balance transfer offers 2012 malaysia apply for credit card with bad credit and no processing fee anz low rate credit card low interest offer what is a credit card pin used for hotel rewards credit cards canada barclays business commercial credit card iphone credit card payment shell gas credit card phone number international student credit card canada are bank of america credit cards any good credit card merchant account india the bay hbc credit card best capital one card for bad credit 76 gas credit card chase credit card services login lloyds tsb platinum credit card sort code apply for walmart mastercard online instant easy cash loans citibank credit card student india natwest credit card services email sbi credit card payment by cheque in favour of visa credit card machine rental capital one venture business credit card reviews delta credit card annual fee direct online payday loan lenders payday cash advance online lenders credit card application process malaysia 3d secure credit card validation icici credit card processing uk iphone hdfc credit card reward points catalogue 2013 instant online loan quote best credit cards for college students uk rebuild credit cards no deposit credit cards for new small business with no credit tesco bank 0 credit card free pay as you go credit card uk southwest credit card offer 50k money magazine best reward credit cards 2012 chase credit card services payment address best credit card balance transfer offers 2011 lloyds tsb credit card customer services how to eliminate credit card debt how to apply for credit card in lloyds tsb online cash advance direct lenders only can you apply for a lowes credit card online halo reach credit limit offline best credit union credit cards 2013 barclays platinum credit card offers credit card number validation c# blank standard credit card authorization form key bank credit card processing list of online payday lenders top credit card issuers 2011 western union prepaid debit visa card bpi credit card application form pdf credit cards bad credit instant approval no processing fee icici instant titanium credit card benefits check your standard chartered credit card status credit cards for international students in usa capital 1 credit card sign in credit limit increase capital one credit card capital one credit card cash advance interest credit card terminal rolls online prepaid credit card japan argos vanquis credit card review business credit cards visa mastercard securecode secure trust bank payday loan lenders list uk free credit cards abroad best credit card rewards programme american airlines credit card points guy best credit card to get with no credit history top ten credit cards 2013 how can i get a credit card with bad credit australia payday loan lender list 0 transfer fee 0 interest credit card how to pay standard chartered credit card bill online banking sentence for credit card fraud uk capital one balance transfer to bank account best buy credit cards hsbc horrible intuit credit card processing complaints gm household bank credit card login credit card debt consolidation uk credit cards accepted in cuba student credit cards instant approval best credit cards for poor credit history best credit card interest rates south africa hilton rewards credit card uk credit card banks in singapore lowest merchant credit card fees credit card verification process india syndicate bank kisan credit card interest rate amazon consumer rewards visa card review apply for a walmart credit card online merchant cash advances uk wells fargo secured credit card cash advance fee best flight points credit card canada visa signature credit card wiki preloaded credit cards us student poor credit credit cards best place to get a student credit card should i cancel low limit credit cards 12 months interest free credit card transfer payday loan lenders uk not brokers payday loans no credit check guaranteed acceptance credit card interest rate calculator online credit card balance transfer no fee no interest circuit city credit card chase phone number 1 hour payday loans no credit check direct lender gold card national rail benefits visa credit card offers india is cashback on credit cards taxable capital one secured credit card 200 deposit uk credit cards bad credit instant approval low rate credit card transfer interest rate credit limit calculator for hdfc credit card platinum credit card icici offers best credit card processing app for ipad credit card score 600 paperless online loans in south africa canadian credit card debt relief program direct payday lenders im 18 what credit card should i get free credit card terminal iphone low limit credit cards for students how to use canadian credit cards at us gas stations short term installment loans online student credit cards martin lewis citibank credit card low interest accepting credit cards over the phone with paypal air miles rewards credit card canada credit card terminal till rolls td debit visa card canada online credit card application philippines ofw quick online cash advance fake virtual credit card generator 0 balance transfer credit cards australia no annual fee unsecured credit cards for bad credit student loans with bad credit rcbc credit card online application philippines toys r us ge credit card login delta credit card visa mastercard marriott rewards credit card comparison
Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
Home arrow Forum arrow The Rest Of NetTalkarrow The Rest - Share Knowledgearrow Getting length from a non Clarion NetSimple packet
NetTalk Central
July 28, 2015, 09:40:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Getting length from a non Clarion NetSimple packet  (Read 5987 times)
Paul Blais
Newbie
*
Posts: 8



View Profile
« on: August 23, 2011, 06:53:58 PM »

The WholePacket NetSimple Methodis great for NetTalk to NetTalk objects since it sends the length as a 4 byte header and can assemble the packets for you saving some code. (See the manual boundary example).

There is a standard way that many non NetTalk TCP applications use. They send the length as a 4 bytes header but it is no Clarion LONG you can distinguish.

The Bytes are sent as a Big Endian ULONG Integer. This is great until you find out Clarion is not Big Endian So we pretend it's a STRING instead and it's all better. You just need a little funny math.

Should Capesoft add an option  to WholePacket to use Big Endian longs they could make WholePacket work with other players as well as Clarion and it wouldn't break anyones code since we compute length as a Clarion LONG, but NetTalk could use Big Endian as an option and we wouldn't care since it is doing all the work.

The following functions will convert properly (we tested it today with a an Online service)

ToBigEndian            PROCEDURE  (LONG RawVal),STRING   

ByteArray               BYTE,DIM(4)
OutputVal               STRING(4),OVER(ByteArray)

  CODE

  ByteArray[1] = INT(RawVal/256^3)
  ByteArray[2] = INT((RawVal % 256^3) / 256^2)
  ByteArray[3] = INT((RawVal % 256^2) / 256)
  ByteArray[4] = INT(RawVal  % 256)
 
  RETURN OutputVal


And to go the other way:

FromBEndian          PROCEDURE  (STRING RawVal), LONG   

ByteArray               BYTE,DIM(4)
InputVal                STRING(4),OVER(ByteArray)
Result                  LONG

  CODE
  InputVal = RawVal

  Result = (INT(ByteArray[1]) * 256^3 + |
            INT(ByteArray[2]) * 256^2 + |
            INT(ByteArray[3]) * 256   + |
            INT(ByteArray[4]))   ! The packet includes the 4 byte header

  RETURN Result


Special thanks to Marc Walgren of MItten Software for being the tester that would have asked me to fix it if it didn't work..

Logged
Bruce
Global Moderator
Hero Member
*****
Posts: 7652



View Profile
« Reply #1 on: August 23, 2011, 10:39:38 PM »

Hi Paul,

Thanks for the suggestion. The following applies to 5.33 and later.

I've added a property,
WholePacketUseBigEndian
to the NetSimple Class.

This only has affect if the WholePacketUseLengthField property is set. If WholePacketUseBigEndian is set then the incoming length field, and the outgoing length field is added ot the header in "Big Endian" format - ie with the most significant byte first.

If this property is not set then the length field is assumed to be in Little Endian format (ie least significant byte first).

Cheers
Bruce
Logged
Paul Blais
Newbie
*
Posts: 8



View Profile
« Reply #2 on: August 30, 2011, 04:07:08 AM »

Sounds exactly as required Bruce. Thanks for the feature!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search